private void crystalReportViewer1_Load(object sender, EventArgs e) { this.crystalReportViewer1.RefreshReport(); SQLiteConnection cn = new SQLiteConnection(sett.con); string BillPath = System.AppDomain.CurrentDomain.BaseDirectory; if (BillPath.EndsWith("\\bin\\Debug\\")) { BillPath = BillPath.Replace("\\bin\\Debug\\", ""); } DataTable dt = new DataTable(); SQLiteDataAdapter adp = new SQLiteDataAdapter("select * from tb_IO where ID=" + sett.Pr_id + " and case_id=" + sett.case_id, cn); adp.Fill(dt); Genflaw_report cryRpt = new Genflaw_report(); BillPath = BillPath + "\\CrystalReport1.rpt"; cryRpt.Load(BillPath); cryRpt.Database.Tables[0].SetDataSource(dt); cryRpt.Refresh(); crystalReportViewer1.ReportSource = cryRpt; crystalReportViewer1.Refresh(); }
DataTable dt = new DataTable("tb_IO");//tb_IO is Table from your SQL query.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)