I want to bring the data from table (using where clause ) into crystal report but when i am running the report form it is showing all the data from the table my query is fine but the code is given below please say : whether it is fine or not : -
help will be greatly appreciated....
//cryRpt.Load(Application.StartupPath + "\\PhotoBill.rpt");
crconnection.ServerName = Common.DefaultDatabasePath;
crconnection.DatabaseName = DatabaseName;
crconnection.UserID = "Admin";
crconnection.Password = "Surat@007";
crtables = cryRpt.Database.Tables;
//cryRpt.SetDataSource(dsreport);
foreach (Table Crtable in crtables)
{
crtableinfo = Crtable.LogOnInfo;
crtableinfo.ConnectionInfo = crconnection;
Crtable.ApplyLogOnInfo(crtableinfo);
}
//crystalReportViewer1.ReportSource = cryRpt;
////DataTable dt = new DataTable();
////dt = dsreport.Tables[0];
////crystalReportViewer1.ReportSource = dt;
//crystalReportViewer1.Refresh();
cryRpt.Load(Application.StartupPath + "\\PhotoBill.rpt");
cryRpt.SetDataSource(dsreport);
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();