ultrafish
asked on
set logon info for subreport
hi all,
I am using CR 8.5 and ASP .net 2002 (C#), my subreport requires login to a file dsn which need a username and password,
I am using asp .net 2002 as the front end, how can I set these login information in the code? here is the code I have right now, (from another nice expert here), however, it doesn't work for me, please help: in here, I don't know where can I set the file dsn, say for example the file is "C:\dsn1.dsn", what can I do? Thanks a lot!!!!
// Create report instance
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load("C:\\P rojects\\A ccpac\\Pro duct Billing\\merge_prompt_for_ custID.rpt "); // location of report
reportDocument.SetDatabase Logon("sa" , "now2k1"); // username and password for DB access
// Assign parameters to report
reportDocument.SetParamete rValue("CU STOMER_ID" , "1000003");
reportDocument.SetParamete rValue("Mo nths", "2004-05");
reportDocument.SetParamete rValue("RU NDATE", DateTime.Now.ToShortDateSt ring());
// Print
reportDocument.PrintOption s.PrinterN ame = "Adobe PDF";
reportDocument.PrintToPrin ter(1, false, 0, 0);
// Export - This will require export options to be defined.
reportDocument.Export();
I am using CR 8.5 and ASP .net 2002 (C#), my subreport requires login to a file dsn which need a username and password,
I am using asp .net 2002 as the front end, how can I set these login information in the code? here is the code I have right now, (from another nice expert here), however, it doesn't work for me, please help: in here, I don't know where can I set the file dsn, say for example the file is "C:\dsn1.dsn", what can I do? Thanks a lot!!!!
// Create report instance
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load("C:\\P
reportDocument.SetDatabase
// Assign parameters to report
reportDocument.SetParamete
reportDocument.SetParamete
reportDocument.SetParamete
reportDocument.PrintOption
reportDocument.PrintToPrin
// Export - This will require export options to be defined.
reportDocument.Export();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.