public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            InterEstateBorrowedFieldWise rpt = new InterEstateBorrowedFieldWise();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void button1_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");
            InterEstateBorrowedFieldWise myOTRegRep = new InterEstateBorrowedFieldWise();

            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();
        }