public void ShowPaymentReviewReport() { _branchId = GlobalVariableBO._branchId; _fromDate = Convert.ToDateTime(dtpFrom.Value.ToShortDateString()); _toDate = Convert.ToDateTime(dtpTO.Value.ToShortDateString()); PaymentReviewBAL paymentBAL = new PaymentReviewBAL(); DataTable dtPaymentReview = new DataTable(); crPaymentReview1 crPayment = new crPaymentReview1(); frmPaymenrReportViewer paymentViewer = new frmPaymenrReportViewer(); LoadCommonInfo CmmInfo = new LoadCommonInfo(); dtPaymentReview = paymentBAL.GneratePaymentReview(_fromDate, _toDate); //_filterdColumnName = dtPaymentReview.Columns[1].ToString(); //RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtPaymentReview, _filterdColumnName, ResourceName.Review_Report_Payment_Review); //dtPaymentReview = obj.GetRecordLevelFilteredData(); crPayment.SetDataSource(dtPaymentReview); ///// Load Company Name ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName(); ///// Load Branch Name ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text = CmmInfo.BranchDetails(_branchId); ////Load Date if (_fromDate != null && _toDate != null) { ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "From " + _fromDate.ToShortDateString() + " To " + _toDate.ToShortDateString(); } paymentViewer.crvPaymentReview.ReportSource = crPayment; paymentViewer.Show(); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crPaymentReview1 rpt = new crPaymentReview1(); rpt.Site = this.Site; return(rpt); }