Posts

Showing posts from December, 2021

Generate and attach a SSRS report as PDF file in document attachment form through X++ code

                   Sometimes we face this requirement to attach a SSRS reports directly on attachment form. Following is the code that helps you to achieve.         str                              fileName;         String10                          Extension;         Args                              _args;         SRSPrintDestinationSettings   printerSettings;         System. Byte []                 reportBytes = new System. Byte [ 0 ]();         SRSProxy                      srsProxy;         SRSReportRunService              srsReportRunService = new SrsReportRunService ();                  Microsoft.Dynamics.AX.Framework.Reporting.Shared.ReportingService. ParameterValue []   parameterValueArray;         Map                           reportParametersMap;          str                           reportnamerun;         SRSReportExecutionInfo        executionInfo = new SRSReportExecutionInfo ();         System.IO. Stream               stream = null ;         _args = new Args ();