Link to home
Start Free TrialLog in
Avatar of ultrafish
ultrafish

asked on

Set connection string in ASP .net (2002) for CR 8.5

Dear all,

does anyone of you know how to set connection string in ASP .net 2002 for CR 8.5?

Thanks
Avatar of ultrafish
ultrafish

ASKER

The situation is I am using asp .net VS 2002 and CR 8.5, in the report, I use file dsn to connect to the database which works properly when I simply view the report, but when I go to .NET, I cannot set the logon info properly, the following is my code, does anyone has anyidea?

ReportDocument rptDoc = new ReportDocument();
rptDoc.Load("C:\\report.rpt");
rptDoc.SetParameterValue("param1", "1");
rptDoc.SetParameterValue("param2", "2");
rptDoc.SetDatabaseLogon("username", "password", "server", "database");                  
crViewer.ReportSource = rptDoc;
rptDoc.Export();

I simply connect to the database....
thanks
Avatar of Mike McCracken
ASKER CERTIFIED SOLUTION
Avatar of ebolek
ebolek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad to help

Regards
Emre