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