public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crIPONRBPayementReview rpt = new crIPONRBPayementReview(); rpt.Site = this.Site; return(rpt); }
private void GetNRBPaymentReview() { IPOReportBAL bal = new IPOReportBAL(); DataTable dtPaymentReview_NRB = new DataTable(); crIPONRBPayementReview crPayment = new crIPONRBPayementReview(); frmIPOReportViewer paymentViewer = new frmIPOReportViewer(); LoadCommonInfo CmmInfo = new LoadCommonInfo(); int selected_BranchID = Convert.ToInt32(cmb_Branch_Name.SelectedValue); dtPaymentReview_NRB = bal.GETIPONRBPaymentReview(selected_BranchID, dtpFromDate.Value, dtpToDate.Value); crPayment.SetDataSource(dtPaymentReview_NRB); GetCommonInfo(); ///// Load Company Name ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName; ///// Load Branch Name ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text = _branchName + "," + _branchAddress + ",Phone: " + _branchContactNumber; ////Load Date ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtFromDate"]).Text = dtpFromDate.Value.ToString("dd-MMM-yyyy") + " To " + dtpToDate.Value.ToString("dd-MMM-yyyy"); paymentViewer.crystalReportViewer1.ReportSource = crPayment; paymentViewer.Show(); }