Regarding connectivity at runtime in Crystal Reports

G

Guest

hi,

i am creating an asp.net based application using c#. and in this application
i am using crystal reports (Ver. 9) drastically which come with the dotnet
set up 2003 and the backend is SQL Server 2000.

now the problem is this, that when i migrated my SQL server database to any
other computer having different IP, then i have to change the database
location in every rpt file of crystal report. now in msdn i found a class
"logoninfo" in dotnet framework and i used that for runtime connectivity of
the rpt file to my new database. but the code is not working.
pls. help me out in this problem. the code which i am writing is given below:

CrystalDecisions.Shared.TableLogOnInfo objlogoninfo = new
CrystalDecisions.Shared.TableLogOnInfo();
CrystalDecisions.Shared.ConnectionInfo objconninfo = new
CrystalDecisions.Shared.ConnectionInfo();

objconninfo = objlogoninfo.ConnectionInfo;
objconninfo.DatabaseName = "e-office";
objconninfo.ServerName = ".";
objconninfo.Password = "";
objconninfo.UserID = "sa";

CrystalReportViewer1.LogOnInfo.Add(objlogoninfo);


Regards

Himanshu Saxena
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top