My Present Code:
cryRpt.Load(Application.StartupPath + "\\VideoBill.rpt");
crconnection.ServerName = Common.DefaultDatabasePath;(server name coming from a common class)
crconnection.DatabaseName = DatabaseName; (database name defined in the top of the page)
crconnection.UserID = "Admin";
crconnection.Password = "Password";
cryRpt.SetDataSource(dsreport.Tables[0]);
crtables = cryRpt.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table Crtable in crtables)
{
crtableinfo = Crtable.LogOnInfo;
crtableinfo.ConnectionInfo = crconnection;
Crtable.ApplyLogOnInfo(crtableinfo);
}
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();
Previously working code :
cryRpt.Load(Application.StartupPath + "\\VideoBill.rpt");
cryRpt.SetDatabaseLogon("Admin", "Password");
cryRpt.SetDataSource(dsreport.Tables[0]);
crystalReportViewer1.ReportSource = cryRpt;
dsreport is filling the value from different dataset called during initialization of the form.
My query is :
in my previous code i was getting only one value inside the crystal report
while i added the current code with logon parameters... i am getting the value of the entire table in the crystal report i.e. all the entries are coming in crystal report
and i want that only my dsreport dataset value should be filled in the crystal report... so what changes should i do in my current coding as the previous coding is not working on the client system so i added the logon parameters code in this form to avoid the logon error in the client system.????