private void CustomerTransactionReportForm_Load(object sender, EventArgs e) { ReportDocument cryRpt; using (Devart.Data.SQLite.SQLiteConnection myConn = new Devart.Data.SQLite.SQLiteConnection(myConfig.connstr)) { using (SQLiteCommand myCmd = new SQLiteCommand(sqlcmd, myConn)) { myConn.Open(); using (SQLiteDataReader myReader = myCmd.ExecuteReader()) { dataSet2.customer_trans.Load(myReader); myConn.Close(); } } } this.customerTableAdapter1.Fill(this.dataSet2.customer); this.configurationTableAdapter1.Fill(this.dataSet2.configuration); CustomerTransactionReport rpt = new CustomerTransactionReport(); rpt.SetDataSource(this.dataSet2); cryRpt = new ReportDocument(); cryRpt.Load(rpt.FileName.ToString()); cryRpt.SetDataSource(this.dataSet2); cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat, ReportFolder.reportFolderName + @"\CustomerTransactions.pdf"); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CustomerTransactionReport rpt = new CustomerTransactionReport(); rpt.Site = this.Site; return rpt; }