public ThermalPrinterFinanceDocumentPayment(SYS_ConfigurationPrinters pPrinter, FIN_DocumentFinancePayment pDocumentFinancePayment, List <int> pCopyNames, bool pSecondCopy) : base(pPrinter, pDocumentFinancePayment.DocumentType, pCopyNames, pSecondCopy) { try { //Parameters _documentFinancePayment = pDocumentFinancePayment; //Init Fast Reports Business Objects (From FRBOHelper) ResultFRBODocumentFinancePayment fRBOHelperResponseProcessReportFinancePayment = FRBOHelper.GetFRBOFinancePayment(pDocumentFinancePayment.Oid); //Get FRBOs Lists _documentFinancePaymentList = fRBOHelperResponseProcessReportFinancePayment.DocumentFinancePayment.List; _documentFinancePaymentDocumentList = fRBOHelperResponseProcessReportFinancePayment.DocumentFinancePayment.List[0].DocumentFinancePaymentDocument; } catch (Exception ex) { throw ex; } }
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //ProcessReportFinanceDocumentPayment public static string ProcessReportFinanceDocumentPayment(CustomReportDisplayMode pViewMode, Guid pDocumentFinancePaymentOid, List <int> pCopyNames, string pDestinationFileName = "") { string result = String.Empty; try { string fileUserReportDocumentFinancePayment = FrameworkUtils.OSSlash(string.Format("{0}{1}\\{2}", GlobalFramework.Path["reports"], "UserReports", "ReportDocumentFinancePayment.frx")); CustomReport customReport = new CustomReport(fileUserReportDocumentFinancePayment, pCopyNames); //Get Result Objects from FRBOHelper ResultFRBODocumentFinancePayment fRBOHelperResponseProcessReportFinancePayment = FRBOHelper.GetFRBOFinancePayment(pDocumentFinancePaymentOid); //Get Generic Collections From FRBOHelper Results FRBOGenericCollection <FRBODocumentFinancePaymentView> gcDocumentFinancePayment = fRBOHelperResponseProcessReportFinancePayment.DocumentFinancePayment; //Prepare and Enable DataSources customReport.RegisterData(gcDocumentFinancePayment, "DocumentFinancePayment"); if (customReport.GetDataSource("DocumentFinancePayment") != null) { customReport.GetDataSource("DocumentFinancePayment").Enabled = true; } if (customReport.GetDataSource("DocumentFinancePayment.DocumentFinancePaymentDocument") != null) { customReport.GetDataSource("DocumentFinancePayment.DocumentFinancePaymentDocument").Enabled = true; } //Add ReportInfo.Name, to be used for Ex in Pdf Filenames, OS etc customReport.ReportInfo.Name = gcDocumentFinancePayment.List[0].PaymentRefNo; result = customReport.Process(pViewMode, pDestinationFileName); customReport.Dispose(); return(result); } catch (Exception ex) { _log.Error(ex.Message, ex); throw new Exception(ex.Message); } }