Beispiel #1
0
        private void btnsingleReport_Click(object sender, EventArgs e)
        {
            DataTable dt          = new DataTable();
            string    StatusName  = Convert.ToString(cmbStatusName.Text);
            string    CompanyName = Convert.ToString(CmbCompanyName.SelectedValue);
            int       branchId    = (int)cmbBranchName.SelectedValue;

            dt = objBAL.IPOSingleApplicationReport(dtpstartdate.Value, dtpenddate.Value, StatusName, CompanyName, branchId);
            crIPOSingleApplicationReport objrpt = new crIPOSingleApplicationReport();
            frmIPOReportViewer           viewer = new frmIPOReportViewer();

            if (dt.Rows.Count > 0)
            {
                objrpt.SetDataSource(dt);
                GetCommonInfo();
                ((TextObject)objrpt.ReportDefinition.Sections[2].ReportObjects["txtreportName"]).Text =
                    "IPO Single Application Status";
                ((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();
            }
            else
            {
                MessageBox.Show("Data not found", "" + MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crIPOSingleApplicationReport rpt = new crIPOSingleApplicationReport();

            rpt.Site = this.Site;
            return(rpt);
        }