Announcements
No record found.
SrsReportRunController controller = new SrsReportRunController(); SRSPrintDestinationSettings printSettings; controller.parmReportName(ssrsReportStr(TestSimpleReport, AutoDesign1)); controller.parmShowDialog(false); controller.parmExecutionMode(SysOperationExecutionMode::Synchronous); printSettings = controller.parmReportContract().parmPrintSettings(); printSettings.printMediumType(SRSPrintMediumType::Archive); controller.parmReportContract().parmPrintSettings(printSettings); controller.startOperation();
/// <summary> /// saveReportToArchive /// </summary> /// <param name = "_stream">System.IO.MemoryStream</param> /// <param name = "_filename">Filename</param> /// <param name = "_reportDescription">Description</param> private void saveReportToArchive(System.IO.MemoryStream _stream, Filename _filename, Description _reportDescription) { SRSPrintArchiveContract printArchiveContract; printArchiveContract = SRSPrintArchiveContract::construct(); printArchiveContract.parmExecutionDate(DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone())); printArchiveContract.parmExecutionTime(DateTimeUtil::getTimeNow(DateTimeUtil::getUserPreferredTimeZone())); printArchiveContract.parmFileName(_filename); printArchiveContract.parmJobDescription(_reportDescription); printArchiveContract.savePrintArchiveDetails(Binary::constructFromMemoryStream(_stream).getContainer()); info('Report has been successfully generated and saved in Print archive.'); }
You are trying to open a form (UI screen) inside a batch job.
But batch jobs in Microsoft Dynamics 365 Finance and Operations run in the background (server-side), where:
So the system throws this error because it cannot display a form in a background process.
Hope it helps ;) and let me know if you need more help!
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!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 608
André Arnaud de Cal... 591 Super User 2026 Season 1
CP04-islander 430