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

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void GetEmployeeInfo()
        {
            try
            {
                ReportBAL       objReportBal    = new ReportBAL();
                DataTable       dtReportBal     = new DataTable();
                cr_EmployeeInfo objEmployee     = new cr_EmployeeInfo();
                frmReportViewer objReportviewer = new frmReportViewer();

                dtReportBal = objReportBal.GetEmployeeInfo();
                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;
                objReportviewer.Text = "Salary Chat";
                objReportviewer.Show();
            }
            catch (Exception)
            {
                throw;
            }
        }