public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { reportTemplate rpt = new reportTemplate(); rpt.Site = this.Site; return(rpt); }
public void bindreport() { datasetReport ds = new datasetReport(); using (SQLiteConnection conn = new SQLiteConnection(DBConn.LoadConnectionString())) { string qry = "SELECT code, title, description, assign_to, done_flag FROM TODO"; conn.Open(); SQLiteCommand cmd = new SQLiteCommand(qry, conn); SQLiteDataAdapter adapter = new SQLiteDataAdapter(); adapter.SelectCommand = cmd; adapter.Fill(ds, ds.Tables["todo"].TableName); reportTemplate crt = new reportTemplate(); crt.SetDataSource(ds); this.crystalReportViewer1.ReportSource = crt; } }