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

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

            dataSetReport = myReports.getCoinAnalysis(Convert.ToInt32(cmbYear.Text), Convert.ToInt32(cmbMonth.SelectedValue.ToString()), Convert.ToInt32(cmbDeduct.SelectedValue.ToString()), cmbDivision.SelectedValue.ToString());
            //dataSetReport = myReports.GetMonthlyAdvanceReport(Convert.ToInt32(cmbYear.Text), Convert.ToInt32(cmbMonth.SelectedValue.ToString()), cmbDivision.Text, Convert.ToInt32(cmbDeduct.SelectedValue.ToString()));
            dataSetReport.WriteXml("MACoinAnalysis.xml");
            MonthlyAdvanceCoinAnalysisRPT myaclist = new MonthlyAdvanceCoinAnalysisRPT();

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

            myaclist.SetParameterValue("CompanyName", FTSPayRollBL.Company.getCompanyName());
            myaclist.SetParameterValue("Estate", EstDivBlock.ListEstates().Rows[0][0].ToString());
            myaclist.SetParameterValue("Period", "Month of : " + cmbMonth.Text + "/" + cmbYear.Text);
            myaclist.SetParameterValue("Deduction", "Advance Code : " + cmbDeduct.Text);

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