private void CreateSGVILiquidationReport() { try { IReports objReports = isCommonCDOforDeclaration ? ReportsBusinessObject.CreateInstance(ExchangeConst, TicketConst) : ReportsBusinessObject.CreateInstance(); DataSet LiquidationDetails = objReports.GetLiquidationDetails(_BatchID); DataSet LiquidationSummaryDetails = objReports.GetLiquidationSummaryDetails(_BatchID); if (LiquidationDetails.Tables[0].Rows.Count == 0 || LiquidationSummaryDetails.Tables[0].Rows.Count == 0) { LogManager.WriteLog("No Records found for the selected criteria - Return", LogManager.enumLogLevel.Info); MessageBox.ShowBox("MessageID261", BMC_Icon.Information); return; } using (CReportViewer cReportViewer = (isCommonCDOforDeclaration && !string.IsNullOrEmpty(ExchangeConst)) ? new CReportViewer(CommonUtilities.SiteConnectionString(ExchangeConst), CommonUtilities.TicketingConnectionString(TicketConst)) : new CReportViewer()) { LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info); cReportViewer.ShowLiquidationReport(LiquidationDetails, LiquidationSummaryDetails, _BatchID); cReportViewer.SetOwner(Window.GetWindow(this)); cReportViewer.ShowDialog(); } LogManager.WriteLog("ShowLiquidationReport Successfull", LogManager.enumLogLevel.Info); } catch (Exception ex) { ExceptionManager.Publish(ex); } }
private void CreateLiquidationReport() { try { //IReports objReports = ReportsBusinessObject.CreateInstance(); LogManager.WriteLog("Fetching report data from database...", LogManager.enumLogLevel.Info); DataSet LiquidationDetails = objReports.GetLiquidationDetails(_BatchID); DataSet LiquidationSummaryDetails = objReports.GetLiquidationSummaryDetails(_BatchID); if (LiquidationDetails.Tables[0].Rows.Count == 0 || LiquidationSummaryDetails.Tables[0].Rows.Count == 0) { LogManager.WriteLog("No Records found for the selected criteria - Return", LogManager.enumLogLevel.Info); MessageBox.ShowBox("MessageID261", BMC_Icon.Information); return; } using (CReportViewer cReportViewer = new CReportViewer()) { LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info); cReportViewer.ShowLiquidationReport(LiquidationDetails, LiquidationSummaryDetails, _BatchID); cReportViewer.SetOwner(System.Windows.Window.GetWindow(this)); cReportViewer.Show(); } LogManager.WriteLog("ShowLiquidationReport Successfull", LogManager.enumLogLevel.Info); } catch (Exception ex) { LogManager.WriteLog("Report" + ex.Message, LogManager.enumLogLevel.Info); } }