Example #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            EmpUnionReport rpt = new EmpUnionReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
        private void btnDisplay_Click(object sender, EventArgs e)
        {
            String StrAllDiv   = "";
            String StrAllUnion = "";

            if (chkAllDiv.Checked)
            {
                StrAllDiv = "%";
            }
            else
            {
                StrAllDiv = cmbDivision.SelectedValue.ToString();
            }
            if (chkAllUnion.Checked)
            {
                StrAllUnion = "%";
            }
            else
            {
                StrAllUnion = cmbNewUnion.SelectedValue.ToString();
            }
            DataSet dsEmpUnionReport = new DataSet();

            dsEmpUnionReport = objListing.getEmployeeUnions(StrAllDiv, StrAllUnion);
            dsEmpUnionReport.WriteXml("EmployeeUnionList.xml");

            EmpUnionReport objReport = new EmpUnionReport();

            objReport.SetDataSource(dsEmpUnionReport);
            ReportViewerForm objReportViewer = new ReportViewerForm();

            objReport.SetParameterValue("CompanyName", FTSPayRollBL.Company.getCompanyName());
            objReport.SetParameterValue("Estate", myDiv.ListEstates().Rows[0][0].ToString());
            objReportViewer.crystalReportViewer1.ReportSource = objReport;
            objReportViewer.Show();
        }