con.Open();
string str = "select * from diesel where Billno='" + cb_billno.SelectedItem + "'";
SqlCommand com = new SqlCommand(str, con);
SqlDataAdapter sqlda = new SqlDataAdapter(com);
DataSet ds = new DataSet();
sqlda.Fill(ds, "diesel");
con.Close();
ReportDocument r1 = new ReportDocument();
r1.Load("Reports/Service Bill.rpt");
r1.SetDataSource(ds);
crystalReportViewer1.ReportSource = r1;
crystalReportViewer1.RefreshReport();In the run mode i have one textbox and one button.in that textbox i type the partucular Bill no and click the button Error Shows as Load Report Failed.
Erro Shows in r1.Load("Reports/Service Bill.rpt"); (Load reprot Failed)
Billno Datatype in Varchar.
For Example R004 and click the button the partiuclar Bill datas want to be appear in crystal report Viewer in Run Mode.
Nitesh KejriwalPosted Nov 2, 2012, 1:36 AM
to get the bill number. I think, you should use txtBillNo.Text where txtBillNo is the textbox ID.