public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptSalesReport rpt = new rptSalesReport();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
 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);
     }
 }
示例#3
0
 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);
     }
 }