try { ReportDocument cryRpt = new ReportDocument(); cryRpt.Load(@"C:\Users\Avi\Documents\Store backup\1Apr\store\Bill.rpt"); con.Open(); adp = new SqlDataAdapter("Select * from Store_Purchasebill where Bill_no=" + bill + "", con); DataSet ds = new DataSet(); adp.Fill(ds, "Store_Purchasebill"); if (ds.Tables[0].Rows.Count > 0) { //.......Put the whole part of report bellow.............. cryRpt.Load(@"C:\Users\Avi\Documents\Store backup\1Apr\store\Bill.rpt"); <big>cryRpt.SetDataSource(ds);// here i get error </big> crystalReportViewer1.ReportSource = cryRpt; crystalReportViewer1.Refresh(); } } catch (Exception se) { MessageBox.Show(se.Message.ToString()); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)