Database Connection
Hi All,
Need some help in database connection and displaying a report in the CrystalReportViewer control. The report is a simple report with no parameters, I highly appreciate your help.
Right now I am using this bu do not have an idea as to what is happening.
crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName="Local";
crConnectionInfo.DatabaseName ="Duc";
crConnectionInfo.UserID ="sa";
crConnectionInfo.Password =" ";
foreach(CrystalDecisions.CrystalReports.Engine.Tab le crTable in crTables)
{
crTableLogonInfo=crTable.LogOnInfo;
crTableLogonInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogonInfo);
}
CrystalReportViewer1.Width =500;
CrystalReportViewer1.BorderWidth =1;
CrystalReportViewer1.ReportSource=@"c:\inetpub\www root\WebApplication1\CrystalReport1.rpt";
New to Crystal Reports, can some one pls correct, URGENT.
Thanks,
Zindagi11
|