Announcements
No record found.
FreeTextInvoiceContract contractFree = new FreeTextInvoiceContract(); FreeTextInvoiceController controllerFree = new FreeTextInvoiceController(); SRSReportRunService srsReportRunService = new SrsReportRunService(); SRSReportExecutionInfo executionInfo = new SRSReportExecutionInfo(); CustInvoiceJour custInvoiceJour; CustInvoiceTable custinvoiceTable = _args.record(); info(any2Str(custinvoiceTable.InvoiceId)); select custInvoiceJour where custInvoiceJour.InvoiceId == custinvoiceTable.InvoiceId; Args args = new Args(), argsMenuFunction = new Args(); str ruta, rutaCliente; Map reportParametersMap; SRSProxy srsProxy; SRSPrintDestinationSettings settings; System.Byte[] reportBytes = new System.Byte[0](); Microsoft.Dynamics.AX.Framework.Reporting.Shared.ReportingService.ParameterValue[] parameterValueArray; args.record(custInvoiceJour); args.parmEnum(PrintCopyOriginal::Copy); args.parmEnumType(enumNum(PrintCopyOriginal)); args.parm("Report"); contractFree.parmPrintCopyOriginal(PrintCopyOriginal::Copy); contractFree.parmInstanceType(PrintMgmtDocInstanceType::Copy); contractFree.parmCustInvoiceJourRecId(custInvoiceJour.RecId); contractFree.parmSuppressDepreciationOfPaymentSection(true); controllerFree.parmArgs(args); controllerFree.parmReportName(ssrsReportStr(FreeTextInvoiceCopy1, MZNUKReport_AR)); controllerFree.parmShowDialog(false); controllerFree.parmLoadFromSysLastValue(false); controllerFree.parmReportContract().parmRdpContract(contractFree); controllerFree.parmReportContract().parmRdlContract().parmLanguageId(custInvoiceJour.LanguageId); controllerFree.parmExecutionMode(SysOperationExecutionMode::Synchronous); settings = controllerFree.parmReportContract().parmPrintSettings(); settings.printMediumType(SRSPrintMediumType::File); settings.fileName(strFmt('%1.pdf', custinvoiceTable.InvoiceId)); settings.fileFormat(SRSReportFileFormat::PDF); controllerFree.parmReportContract().parmReportServerConfig(SRSConfiguration::getDefaultServerConfiguration()); controllerFree.parmReportContract().parmReportExecutionInfo(executionInfo); srsReportRunService.getReportDataContract(controllerFree.parmreportcontract().parmReportName()); srsReportRunService.preRunReport(controllerFree.parmreportcontract()); reportParametersMap = srsReportRunService.createParamMapFromContract(controllerFree.parmReportContract()); parameterValueArray = SrsReportRunUtil::getParameterValueArray(reportParametersMap); srsProxy = SRSProxy::constructWithConfiguration(controllerFree.parmReportContract().parmReportServerConfig()); reportBytes = srsproxy.renderReportToByteArray(controllerFree.parmreportcontract().parmreportpath(), parameterValueArray, settings.fileFormat(), settings.deviceinfo());
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 576 Super User 2026 Season 1
Giorgio Bonacorsi 366
Adis 256 Super User 2026 Season 1