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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void PrintWithSignature()
        {
            DataTable dt = new DataTable();
            crIpoApplicationForPublicIssue objrpt = new crIpoApplicationForPublicIssue();
            frmIPOReportViewer             viewer = new frmIPOReportViewer();

            if (CmbCompanyCode.SelectedItem.Equals("Company Name"))
            {
                dt = objBAL.GetPublicApplicationIssue("", CmbCustCode.Text);
            }
            else if (CmbCompanyCode.SelectedItem.Equals("Cust Code"))
            {
                dt = objBAL.GetPublicApplicationIssue(CmbCustCode.Text, "");
            }
            else if (CmbCompanyCode.SelectedItem.Equals("Code and Company"))
            {
                dt = objBAL.GetPublicApplicationIssue(CmbCustCode.Text, CmbCompany.Text);
            }

            objrpt.SetDataSource(dt);
            GetCommonInfo();
            ((TextObject)objrpt.ReportDefinition.Sections[2].ReportObjects["txtreportName"]).Text =
                "IPO Application for public issue";
            ((TextObject)objrpt.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text =
                _CommpanyName;
            ///// Load Branch Name
            ((TextObject)objrpt.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text =
                "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber;
            viewer.crystalReportViewer1.ReportSource = objrpt;
            viewer.Show();
        }