private void ReportView() { try { CompanyBAL objCompanyBal = new CompanyBAL(); PaymentReviewBAL paymentBAL = new PaymentReviewBAL(); DataTable dtPaymentReview = new DataTable(); crPaymentReview1 crPayment = new crPaymentReview1(); frmPaymenrReportViewer paymentViewer = new frmPaymenrReportViewer(); LoadCommonInfo CmmInfo = new LoadCommonInfo(); BranchManagementBAL objBranchManagement = new BranchManagementBAL(); dtPaymentReview = paymentBAL.GneratePaymentReviewByBranchWise(dtpFromDate.Value, dtpToDate.Value); //_filterdColumnName = dtPaymentReview.Columns[1].ToString(); //RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtPaymentReview, _filterdColumnName, ResourceName.Branch_wise_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 = objCompanyBal.GetHeadofficeInfo(); ////Load Date ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "Review Duration: " + dtpFromDate.Value.ToString("dd-MM-yyyy") + " " + dtpToDate.Value.ToString("dd-MM-yyyy"); ((TextObject)crPayment.ReportDefinition.Sections[2].ReportObjects["txtBranch"]).Text = "Branch : " + objBranchManagement.GetBranchName(); paymentViewer.crvPaymentReview.ReportSource = crPayment; paymentViewer.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ReportView() { if (ddlCompanyShortCode.Text == string.Empty) { MessageBox.Show("Please Select Instrument Short Code"); return; } DataTable dt = new DataTable(); ShareBalanceBAL reportBAL = new ShareBalanceBAL(); LoadCommonInfo CmmInfo = new LoadCommonInfo(); CompanyBAL objCompanyBal = new CompanyBAL(); string compShortCode = ddlCompanyShortCode.Text; DateTime fromDate = dtStartDate.Value; DateTime toDate = dtEndDate.Value; dt = reportBAL.GetCompanyWiseShareTradeList(compShortCode, fromDate, toDate); crInstruwiseShareTradeList reportFile = new crInstruwiseShareTradeList(); reportFile.SetDataSource(dt); ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtCompanyName"]).Text = CmmInfo.ShowCompanyName(); ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtBranchName"]).Text = objCompanyBal.GetHeadofficeInfo(); ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtReportDate"]).Text = "From " + fromDate.ToShortDateString() + " To " + toDate.ToShortDateString(); ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtInstruName"]).Text = Convert.ToString(dt.Rows[0][2]); ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtInstruCode"]).Text = Convert.ToString(dt.Rows[0][1]); ((TextObject)reportFile.ReportDefinition.Sections[1].ReportObjects["txtInstruGroup"]).Text = Convert.ToString(dt.Rows[0][3]); frmInstruwiseShareTradeListViewer reportViewer = new frmInstruwiseShareTradeListViewer(); reportViewer.crvInstruWiseShareTradeList.ReportSource = reportFile; reportViewer.Show(); }