public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { InterEstateBorrowedLabourRegister rpt = new InterEstateBorrowedLabourRegister(); rpt.Site = this.Site; return(rpt); }
private void cmdDisplay2_Click(object sender, EventArgs e) { DataSet dataSetReport = new DataSet(); dataSetReport = myReports.getInterEstateBorrowedLabourRegister(Convert.ToDateTime(dtFrom.Value.Date), Convert.ToDateTime(dtTo.Value.Date)); dataSetReport.WriteXml("InterEstateBorrowedLabour.xml"); InterEstateBorrowedLabourRegister myOTRegRep = new InterEstateBorrowedLabourRegister(); myOTRegRep.SetDataSource(dataSetReport); ReportViewer myReportViewer = new ReportViewer(); myOTRegRep.SetParameterValue("Company Name", FTSPayRollBL.Company.getCompanyName()); myOTRegRep.SetParameterValue("Date", "From: " + dtFrom.Value.Date.ToShortDateString() + " To:" + dtTo.Value.Date.ToShortDateString()); myOTRegRep.SetParameterValue("Division", "Borrowed Estate : " + FTSPayRollBL.User.StrEstate); myReportViewer.crystalReportViewer1.ReportSource = myOTRegRep; myReportViewer.Show(); }