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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void btnRPT3_Click(object sender, EventArgs e)
        {
            String strDivision = "%";

            if (chkAll.Checked)
            {
                strDivision = "%";
            }
            else
            {
                strDivision = cmbDivision.SelectedValue.ToString();
            }

            DataSet dataSetReport = new DataSet();

            try
            {
                cmbYear_SelectedIndexChanged(null, null);
                //dataSetReport.Tables.Add(HoliPay.GetHolidayPayData(cmbDivision.SelectedValue.ToString(), Convert.ToInt32(cmbYear.SelectedValue.ToString())));
                dataSetReport = HoliPay.ListHolidaypayMandaysEarningsNotOffered(Convert.ToInt32(cmbYear.SelectedValue.ToString()), strDivision);
                if (dataSetReport.Tables[0].Rows.Count > 0)
                {
                    dataSetReport.WriteXml("HolidaypayRPT3.xml");
                    HolidaypayRPT3 myHPData = new HolidaypayRPT3();
                    myHPData.SetDataSource(dataSetReport);
                    ReportViewer myReportViewer = new ReportViewer();

                    myHPData.SetParameterValue("Company Name", FTSPayRollBL.Company.getCompanyName());
                    myHPData.SetParameterValue("Division", EstDivBlock.ListEstates().Rows[0][0].ToString() + " / " + cmbDivision.SelectedValue.ToString());
                    myHPData.SetParameterValue("Year", cmbYear.SelectedValue.ToString());
                    myReportViewer.crystalReportViewer1.ReportSource = myHPData;
                    myReportViewer.Show();
                }
                else
                {
                    MessageBox.Show("No Data To Preview\r\nMay Be Holidaypay Data Already Confirmed");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error, " + ex.Message);
            }
        }