public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { AdditionsRegisterRPT rpt = new AdditionsRegisterRPT(); rpt.Site = this.Site; return(rpt); }
private void cmdDisplay2_Click(object sender, EventArgs e) { DataSet dataSetReport = new DataSet(); dataSetReport = myReports.getAdditionsRegister(Convert.ToInt32(cmbYear.Text), Convert.ToInt32(cmbMonth.SelectedValue.ToString())); dataSetReport.WriteXml("AdditionsRegister.xml"); AdditionsRegisterRPT myaclist = new AdditionsRegisterRPT(); 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(); }