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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void cmdDisplay2_Click(object sender, EventArgs e)
        {
            DataSet dataSetReport = new DataSet();

            dataSetReport = myReports.GetMonthlyAdvanceReport(Convert.ToInt32(cmbYear.Text), Convert.ToInt32(cmbMonth.SelectedValue.ToString()), cmbDivision.Text, Convert.ToInt32(cmbDeduct.SelectedValue.ToString()));
            dataSetReport.WriteXml("MonthlyAdvanceReport.xml");
            MonthlyAdvanceRPT myaclist = new MonthlyAdvanceRPT();

            myaclist.SetDataSource(dataSetReport);
            ReportViewer myReportViewer = new ReportViewer();

            myaclist.SetParameterValue("Company Name", FTSPayRollBL.Company.getCompanyName());
            myaclist.SetParameterValue("Month", cmbMonth.Text + " / " + cmbYear.Text);
            myaclist.SetParameterValue("Division", cmbDivision.Text);
            myaclist.SetParameterValue("Deduction", "Monthly Advance Code : " + cmbDeduct.Text);
            myReportViewer.crystalReportViewer1.ReportSource = myaclist;
            myReportViewer.Show();
        }