public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptSalesReport rpt = new rptSalesReport(); rpt.Site = this.Site; return(rpt); }
private void salesReportToolStripMenuItem_Click(object sender, EventArgs e) { try { BusinessManager BM = new BusinessManager(); rptSalesReport report = new rptSalesReport(); report.SetDataSource(BM.BALSalesReport()); frmSalesReport rpt = new frmSalesReport(); rpt.crystalReportViewer1.ReportSource = report; rpt.Visible = true; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button1_Click(object sender, EventArgs e) { try { Cursor = Cursors.WaitCursor; timer1.Enabled = true; BusinessManager BM = new BusinessManager(); rptSalesReport report = new rptSalesReport(); report.SetDataSource(BM.BALSalesReport()); frmSalesReport rpt = new frmSalesReport(); rpt.crystalReportViewer1.ReportSource = report; rpt.Visible = true; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }