public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { DeductionsRegisterRPT rpt = new DeductionsRegisterRPT(); rpt.Site = this.Site; return(rpt); }
private void cmdDisplay2_Click(object sender, EventArgs e) { DataSet dataSetReport = new DataSet(); dataSetReport = myReports.getDeductionsRegister(Convert.ToInt32(cmbYear.Text), Convert.ToInt32(cmbMonth.SelectedValue.ToString())); dataSetReport.WriteXml("DeductionsRegister.xml"); DeductionsRegisterRPT myaclist = new DeductionsRegisterRPT(); myaclist.SetDataSource(dataSetReport); ReportViewer myReportViewer = new ReportViewer(); myaclist.SetParameterValue("Company Name", FTSPayRollBL.Company.getCompanyName()); myaclist.SetParameterValue("Period", cmbMonth.Text + " of " + cmbYear.Text); myReportViewer.crystalReportViewer1.ReportSource = myaclist; myReportViewer.Show(); }