public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { UserAuditRPT rpt = new UserAuditRPT(); rpt.Site = this.Site; return(rpt); }
private void btnUserAudit_Click(object sender, EventArgs e) { DataSet dsDivisionReport = new DataSet(); dsDivisionReport = myReports.getUserAudit(dtpFromDate.Value.Date, dtpToDate.Value.Date); dsDivisionReport.WriteXml("UserAudit.xml"); UserAuditRPT objReport = new UserAuditRPT(); objReport.SetDataSource(dsDivisionReport); ReportViewerForm objReportViewer = new ReportViewerForm(); objReport.SetParameterValue("Estate", myEstate.ListEstates().Rows[0][0].ToString()); objReport.SetParameterValue("CompanyName", FTSPayRollBL.Company.getCompanyName()); objReportViewer.crystalReportViewer1.ReportSource = objReport; objReportViewer.Show(); }