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

            rpt.Site = this.Site;
            return(rpt);
        }
        public override ReportDocument GenerateReport()
        {
            if (EmpList != null)
            {
                GenerateDetailByEmpID();
                if (reportDocument == null)
                {
                    if (reportType.Equals(ReportType.PaySlip))
                    {
                        reportDocument = new ReportTemplate.Report_Payroll_PaySlip();
                    }
                    else if (reportType.Equals(ReportType.PaySlipDotMatrix))
                    {
                        reportDocument = new ReportTemplate.Report_Payroll_PaySlipDotMatrix();
                    }
                    else if (reportType.Equals(ReportType.TrialRun))
                    {
                        reportDocument = new ReportTemplate.Report_Payroll_TrialRunDetail();
                    }
                    else if (reportType.Equals(ReportType.History))
                    {
                        reportDocument = new ReportTemplate.Report_Payroll_HistoryDetail();
                    }
                }
                else
                {
                }
                if (PaperMargin.topMargin >= 0)
                {
                    reportDocument.PrintOptions.ApplyPageMargins(PaperMargin);
                }
                reportDocument.SetDataSource(dataSet);

                //reportDocument.Subreports["Report_Payroll_PaySlip_SubMPF"].SetDataSource(dataSet);
                //reportDocument.Subreports["Report_Payroll_PaySlip_SubORSO"].SetDataSource(dataSet);
                //if (IsShowLeaveBalance)
                //    reportDocument.Subreports["Report_Payroll_PaySlip_SubLeaveBalance"].SetDataSource(dataSet);
                return(reportDocument);
            }
            else
            {
                return(null);
            }
        }