|
No, I think that what you're saying is ridiculous and you need to consider the rules of the list you're asking for help, instead of just assuming your problems are worse than everyone elses.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i want to have a report generator in Visual Studio .net(C#) that i can generate my reports easyly and fast .
|
|
|
|
|
What is wrong with Crystal ? There's a great library from Dundas for creating charts, would that help ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i want to pass text of a combobox to crystal report from another form and can not do this.can you help me.
in delphi and with quick report it is very easy to do(the objects of Quick report is accessable from another form)
thanks.
|
|
|
|
|
1. Parameter
2. SelectionFormula.
|
|
|
|
|
thanks for your attention.
I tried parameter but could not use it can you explain me how to use it and if you have a sample for these two solutions please show me.
thanks a lot.
|
|
|
|
|
|
|
In ASP.Net, I'm trying to download one .exe file, on click of hyperlink.
I used the following javascript to download or open..
function OpenFile()
{
window.open("D:/Games/poker.exe",
'FilePopUp',
'resizable=yes,scrollbars=1');
}
If I give some other files in place of poker.exe, like .doc, .pdf, the code is working. but unable to download .exe files.
Thanks in advance.
|
|
|
|
|
May be it is due to security settings of your web browser, try renaming exe to something else and download it from the same path e.g "D:\Games\poker.dat". If it works then there is security problems due to exe file, otherwise there may be some other problem.
Anindya Chatterjee
|
|
|
|
|
when I tried to access other files from the same path, it is getting executed successfully.
In case of .exe files, I'm getting javascript error saying that Access is denied. Its a security voilation problem. Read-only property of the file is unchecked. Please guide me to solve this problem.
|
|
|
|
|
Do you have an Antivirus that prohibits .EXE downloads?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
you're in the wrong forum, but this code is useless, because it will only work if the server is also the machine doing the browsing. No way is IE going to let you run an exe on the local machine. If you want to download an exe, set the content type and use response.binarywrite, then use a path like this to read the file on the file system if you like. In javascript, you'd also redirect to a page that streams the file down.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
LalithaSJ wrote: unable to download .exe files
Can you describe what happens? Do you get an error? What error message are you getting?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
try different approach. Use this code in some button click event handler
FileStream fs = null;
string strContentType = "application/octet-stream";
string strPath = Server.MapPath("FILE_LOCATION_HERE") + "\\";
String strFileName = "FILE_NAME_HERE";
if (File.Exists(strPath + strFileName))
{
byte[] bytBytes = new byte[fs.Length];
fs = File.Open(strPath + strFileName, FileMode.Open);
fs.Read(bytBytes, 0, (int)fs.Length);
fs.Close();
Response.AddHeader("Content-disposition", "attachment; filename=" + strFileName);
Response.ContentType = strContentType;
Response.BinaryWrite(bytBytes);
Response.End();
}
Strahil Shorgov
|
|
|
|
|
Thanks alot Strahil Shorgov!!
|
|
|
|
|
I want to pass text of a combobox in my form to crystal report to use as header title.
How can I do this?
|
|
|
|
|
Hi,
Here is the code snippet:
CrystalDecisions.CrystalReports.Engine.ReportDocument reportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
reportDocument.Load("samplereport.rpt");
reportDocument.SummaryInfo.ReportTitle = comboBox1.Text;
reportDocument.SetDataSource(dset);
crystalReportViewer1.ReportSource = reportDocument;
Thanks,
Gopal.S
|
|
|
|
|
|
I'm writing a C# plugin for a C app, which has well defined API's, structures, etc. I'm trying to figure out how to use a icon / image resource in my C# project and properly convert it to the C struct.
For example, the C struct I have to use is:
struct medium_entry<br />
{<br />
unsigned int struct_size;<br />
<br />
char *medium;<br />
char *description;<br />
int allows_accounts;<br />
int allows_connections;<br />
<br />
ttkCallback callback;<br />
void *data;<br />
<br />
unsigned char *png_image_32;<br />
unsigned int png_image_32_len;<br />
unsigned char *png_image_16;<br />
unsigned int png_image_16_len;<br />
};
Here is the C# representation of that struct, which the P/Invoke Interop Assistant tool (winsiggen.exe) generated for me:
<br />
[StructLayoutAttribute( LayoutKind.Sequential )]<br />
public class medium_entry<br />
{<br />
public uint struct_size;<br />
<br />
[MarshalAsAttribute( UnmanagedType.LPStr )]<br />
public string medium;<br />
<br />
[MarshalAsAttribute( UnmanagedType.LPStr )]<br />
public string description;<br />
<br />
public ttkCallback callback;<br />
<br />
public System.IntPtr data;<br />
<br />
[MarshalAsAttribute( UnmanagedType.LPStr )]<br />
public string png_image_32;<br />
<br />
public uint png_image_32_len;<br />
<br />
[MarshalAsAttribute( UnmanagedType.LPStr )]<br />
public string png_image_16;<br />
<br />
public uint png_image_16_len;<br />
<br />
public medium_entry_t()<br />
{<br />
this.struct_size = (uint)Marshal.SizeOf( typeof( medium_entry ) );<br />
}<br />
}<br />
Here is sample code on how the image would be loaded in C:
<br />
HRSRC ImageRes;<br />
data *medium_entry;
HMODULE hInstance;
<br />
ImageRes = FindResource(hInstance, MakeIntResource(102), "PNG");<br />
data->png_image_32 = LockResource(LoadResource(hInstance, ImageRes));<br />
data->png_image_32_len = SizeOfResource(hInstance, ImageRes);<br />
I've tried two different methods of loading up an image and storing it in the medium_entry class, but neither have worked in the C app, so I assume I'm doing something wrong.
The managed way:
<br />
Bitmap bmp = null;<br />
System.IO.Stream imgStream = thisExe.GetManifestResourceStream( "Plugin.Resources.online_16x16.png" );<br />
<br />
bmp = Bitmap.FromStream( imgStream ) as Bitmap;<br />
if ( !( null == bmp ) )<br />
{<br />
Rectangle rect = new Rectangle( 0, 0, bmp.Width, bmp.Height );<br />
BitmapData bmpData = bmp.LockBits( rect, ImageLockMode.ReadOnly, bmp.PixelFormat );<br />
MediumEntry.png_image_16 = bmpData.Scan0;<br />
MediumEntry.png_image_16_len = (uint)imgStream.Length;<br />
<br />
bmp.UnlockBits( bmpData );<br />
}<br />
The C interop way:
<br />
IntPtr hMod = WinLoadApi.LoadLibraryEx(Pathtoatestdllwithpngimage, IntPtr.Zero, WinLoadApi.LOAD_LIBRARY_AS_DATAFILE);<br />
IntPtr hRes = WinLoadApi.FindResource(hMod, 209, "PNG");<br />
MediumEntry.png_image_16 = WinLoadApi.LoadResource(hMod, hRes);<br />
MediumEntry.png_image_16_len = WinLoadApi.SizeofResource(hMod, hRes);<br />
1) Should png_image_32/16 really be an IntPtr instead of String? I've tried both ways in code (actually the code above mostly uses IntPtr).
2) What am I missing, because I simply can't get ANY sort of image loaded from C# to show up in the C. app using its defined structure.
|
|
|
|
|
I am faced with a task of opening a provided comma delimited file which is in .csv., i.e I wish to open it in a spread sheet program. Any hints on the code format in C# . It has specific headers and will therefore end up with a list of workers having different values under each header. Many thanks.
|
|
|
|
|
If the spreadsheet is Excel, it will open a csv. Either way, how do you mean, to open it in C#, if you're opening it in an external program ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have opened the file using a C# program i have created. i am able to read the contents in a textbox using streamreader inputstream and openfile dialogue. But I wish to be able to read/access the contents in excel using my C# program.
|
|
|
|
|
OK - there's a library you can use to control Excel from C#, the Microsoft tools for office, or something ? Excel will just read yourcsv,but you can create workbooks in C#
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Any other suggestions,contributions? Not there yet.
|
|
|
|