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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void btnViewReport_Click(object sender, EventArgs e)
        {
            List_Of_Pledge_Clients_DSE_21_26_1BAL objBAL = new List_Of_Pledge_Clients_DSE_21_26_1BAL();
            DataTable       data      = new DataTable();
            frmReportViewer rptviewer = new frmReportViewer();
            crList_Of_Pledge_Clients_DSE_21_26_1 objrpt = new crList_Of_Pledge_Clients_DSE_21_26_1();

            data = objBAL.GetList_Of_Pledge_Clients_ReportData(dtpFromDate.Value, dtpToDate.Value, ddlExchange.Text);
            objrpt.SetDataSource(data);
            ((TextObject)objrpt.Section2.ReportObjects["txtDate"]).Text         = dtpToDate.Value.ToString("dd-MMMM-yyyy");
            ((TextObject)objrpt.Section2.ReportObjects["ToDate"]).Text          = dtpToDate.Value.ToString("dd-MMMM-yyyy");
            ((TextObject)objrpt.Section2.ReportObjects["txtExchangeName"]).Text = ddlExchange.Text;

            rptviewer.crvReportViewer.ReportSource = objrpt;
            rptviewer.Show();
        }