public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { EPF_EVEMP_RPT rpt = new EPF_EVEMP_RPT(); rpt.Site = this.Site; return(rpt); }
private void btnEVEMP_Click(object sender, EventArgs e) { DataSet dsReport = new DataSet(); dsReport = myReport2.GetEVEMP(cmbYear.Text.PadLeft(4, '0') + cmbMonth.SelectedValue.ToString().PadLeft(2, '0')); dsReport.WriteXml("EVEMP.xml"); EPF_EVEMP_RPT objReport = new EPF_EVEMP_RPT(); objReport.SetDataSource(dsReport); ReportViewerForm objReportViewer = new ReportViewerForm(); objReportViewer.crystalReportViewer1.ReportSource = objReport; objReportViewer.Show(); }