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:\\Projects\\Accpac\\Product Billing\\merge_prompt_for_custID.rpt");  // location of report

reportDocument.SetDatabaseLogon("sa", "now2k1"); // username and password for DB access

// Assign parameters to report      
reportDocument.SetParameterValue("CUSTOMER_ID", "1000003");
reportDocument.SetParameterValue("Months", "2004-05");
reportDocument.SetParameterValue("RUNDATE", DateTime.Now.ToShortDateString());
// Print
reportDocument.PrintOptions.PrinterName = "Adobe PDF";
reportDocument.PrintToPrinter(1, false, 0, 0);

// Export - This will require export options to be defined.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.