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

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

            try
            {
                String strDivision = "%";
                if (chkAll.Checked)
                {
                    strDivision = "%";
                }
                else
                {
                    strDivision = cmbDivision.SelectedValue.ToString();
                }
                //dataSetReport.Tables.Add(HoliPay.GetHolidayPayData(cmbDivision.SelectedValue.ToString(), Convert.ToInt32(cmbYear.SelectedValue.ToString())));
                dataSetReport = HoliPay.ListHolidayPayData(Convert.ToInt32(cmbYear.SelectedValue.ToString()), strDivision);
                if (dataSetReport.Tables[0].Rows.Count > 0)
                {
                    dataSetReport.WriteXml("HolidaypaySignatureList.xml");
                    HolidaypaySignatureListRPT myHPData = new HolidaypaySignatureListRPT();
                    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");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error, " + ex.Message);
            }
        }