예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            cr_EmployeeDetaisInformation rpt = new cr_EmployeeDetaisInformation();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void GetEmployeeDatailsInfo(string EmployeeCode)
        {
            try
            {
                ReportBAL objReportBal = new ReportBAL();
                DataTable dtReportBal  = new DataTable();
                cr_EmployeeDetaisInformation objEmployee = new cr_EmployeeDetaisInformation();
                frmReportViewer objReportviewer          = new frmReportViewer();

                dtReportBal = objReportBal.GetEmployeeDetailsInfo(EmployeeCode);
                objEmployee.SetDataSource(dtReportBal);

                GetCommonInfo();
                ((TextObject)objEmployee.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
                ((TextObject)objEmployee.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text     = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber;


                objReportviewer.crvReportViewer.ReportSource     = objEmployee;
                objReportviewer.crvReportViewer.DisplayGroupTree = false;


                DataTable dtList = new DataTable();
                dtList = objReportBal.GetEmployeePurposeList(EmployeeCode);
                objEmployee.Subreports[0].SetDataSource(dtList);

                objReportviewer.Text = "Personal Profile";
                objReportviewer.Show();
            }
            catch (Exception)
            {
                throw;
            }
        }