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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void btnDepositFund_Click(object sender, EventArgs e)
        {
            string supCode = cmbSupplier.SelectedValue.ToString();

            if (chkSupplier.Checked)
            {
                supCode = "%";
            }

            String strAllDeductions = "%";

            if (!chkDeduction.Checked)
            {
                strAllDeductions = cmbDeductionCode.SelectedValue.ToString();
            }

            DataSet dataSet = myMonthlySummary.getMonthlyDepositFundContribution(Convert.ToInt32(cmbYear.SelectedValue), Convert.ToInt32(cmbMonth.SelectedValue), supCode);

            dataSet.WriteXml("MonthlyDepositFundContribution.xml");
            MonthlyDepositFundContributionRPT myReport = new MonthlyDepositFundContributionRPT();

            myReport.SetDataSource(dataSet);

            myReport.SetParameterValue("Year", cmbYear.SelectedValue.ToString());
            myReport.SetParameterValue("Month", cmbMonth.Text);
            myReport.SetParameterValue("Company", BoughtLeafBusinessLayer.BLUser.getCompanyName());

            if (chkDeduction.Checked == true)
            {
                myReport.SetParameterValue("Deduction", "All Deduction");
            }
            else
            {
                myReport.SetParameterValue("Deduction", cmbDeductionCode.Text);
            }

            if (chkRoute.Checked == true)
            {
                myReport.SetParameterValue("Route", "All Route");
            }
            else
            {
                myReport.SetParameterValue("Route", cmbRoute.Text);
            }

            ReportViewer rptViewer = new ReportViewer();

            rptViewer.crystalReportViewer1.ReportSource = myReport;
            rptViewer.Show();
        }