public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { SummaryReport rpt = new SummaryReport(); rpt.Site = this.Site; return(rpt); }
private void summaryReportForm_Load(object sender, EventArgs e) { DataTable table = new DataTable(); MySqlDataReader reader = null; table.Columns.Add("ItemCount", typeof(uint)); table.Columns.Add("IssuedPlace", typeof(string)); try { reader = DBConnection.getData(qry); if (reader.HasRows) { while (reader.Read()) { table.Rows.Add(reader.GetUInt32("itemQty"), reader.GetString("place")); } reader.Close(); SummaryReport rpt = new SummaryReport(); rpt.Database.Tables["SummaryDataTable"].SetDataSource(table); crystalReportViewerSummary.ReportSource = null; crystalReportViewerSummary.ReportSource = rpt; } else { reader.Close(); MessageBox.Show("Sorry, no Issues yet!", "Bags picker by date", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception) { MessageBox.Show("Sorry, no Issues yet!", "Bags picker by date", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }