We have a complex custom inventory aging report that runs in ok in DEV but somehow fails in UAT and Production where are getting this:
An error occurred when running report "Report name" in batch. Contact your system administrator for more information. For more information about this error navigate to the report server on the local server machine, or enable remote errors.
Using Application insight integration I could get a call stack, and I understand that it is failing in renderReportToByteArray, I doubted a file size issue while trying to push the file to archive so I increased the attachment size in Document management but yet no luck. Any clue how to get the root cause?
A finding was when we run the report for a selection of items it works fine. But when we run for entire items list we get this issue. The customer needs the full report in one shot.
Call stack:
at[Microsoft Corporation:MonitoringAndTelemetry]SysApplicationInsightsCallStackProperty[class]\`newFromCurrentCallStack() at[Microsoft Corporation:MonitoringAndTelemetry]SysApplicationInsightsCallStackProperty[class]\newFromCurrentCallStack() at[Microsoft Corporation:MonitoringAndTelemetry]SysApplicationInsightsGlobalTelemetry[class]\`Global_Pre_error(XppPrePostArgs args) at[Microsoft Corporation:MonitoringAndTelemetry]SysApplicationInsightsGlobalTelemetry[class]\Global_Pre_error(XppPrePostArgs args) at[Support]Microsoft.Dynamics.Ax.Xpp.XppPrePostDelegate\Invoke(XppPrePostArgs args) at[Microsoft Corporation:ApplicationPlatform]Global[class]\`error(String txt, String helpUrl, SysInfoAction _sysInfoAction, Boolean @helpUrl_IsDefaultSet, Boolean @_sysInfoAction_IsDefaultSet) at[Microsoft Corporation:ApplicationPlatform]Global[class]\error(String txt, String helpUrl, SysInfoAction _sysInfoAction, Boolean @helpUrl_IsDefaultSet, Boolean @_sysInfoAction_IsDefaultSet) at[Microsoft Corporation:ApplicationPlatform]Global[class]\error(String txt) at[Microsoft Corporation:ApplicationFoundation]SrsProxy[class]\`handleClrException(Exception exceptionType) at[Microsoft Corporation:ApplicationFoundation]SrsProxy[class]\handleClrException(Exception exceptionType) at[Microsoft Corporation:ApplicationFoundation]SrsProxy[class]\`renderReportToByteArray(String _reportPath, ParameterValue[] _parameterValueArray, SRSReportFileFormat _fileFormat, String _deviceInfo, String _executionID, Boolean @_executionID_IsDefaultSet) at[Microsoft Corporation:ApplicationFoundation]SrsProxy+SrsProxyCoCHelper[class]\`renderReportToByteArray(SrsProxy instance, String arg0, ParameterValue[] arg1, SRSReportFileFormat arg2, String arg3, String arg4, Boolean ) at[Microsoft Corporation:ApplicationSuite]SrsProxy_ApplicationSuite_IT_Extension[class]\renderReportToByteArray(SrsProxy this, String _reportPath, ParameterValue[] _parameterValueArray, SRSReportFileFormat _fileFormat, String _deviceInfo, String _executionID) at[Microsoft Corporation:ApplicationFoundation]SrsProxy+SrsProxyCoCHelper[class]\`renderReportToByteArray(SrsProxy instance, String arg0, ParameterValue[] arg1, SRSReportFileFormat arg2, String arg3, String arg4, Boolean ) at[Microsoft Corporation:ApplicationFoundation]SrsProxy[class]\renderReportToByteArray(String _reportPath, ParameterValue[] _parameterValueArray, SRSReportFileFormat _fileFormat, String _deviceInfo, String _executionID, Boolean @_executionID_IsDefaultSet) at[Microsoft Corporation:ApplicationFoundation]SrsProxy[class]\renderReportToByteArray(String _reportPath, ParameterValue[] _parameterValueArray, SRSReportFileFormat _fileFormat, String _deviceInfo, String _executionID) at[Microsoft Corporation:ApplicationFoundation]SrsReportRunPrinter[class]\toArchive() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunPrinter[class]\`printReport() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunPrinter[class]\printReport() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunService[class]\`runReport(SrsReportDataContract _reportContract) at[Microsoft Corporation:ApplicationFoundation]SrsReportRunService[class]\runReport(SrsReportDataContract _reportContract) at[Microsoft Corporation:ApplicationFoundation]SrsReportRunImpl[class]\`runReport() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunImpl[class]\runReport() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunController[class]\doReportRun() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunController[class]\`runReport() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunController+SrsReportRunControllerCoCHelper[class]\`runReport(SrsReportRunController instance) at[Microsoft Corporation:ApplicationSuite]SrsReportRunController_Copilot_Extension[class]\runReport(SrsReportRunController this) at[Microsoft Corporation:ApplicationFoundation]SrsReportRunController+SrsReportRunControllerCoCHelper[class]\`runReport(SrsReportRunController instance) at[Microsoft Corporation:ApplicationFoundation]SrsReportRunController[class]\runReport() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunController[class]\`run() at[Microsoft Corporation:ApplicationFoundation]SrsReportRunController[class]\run() at[LT_ApplicationSuite:LT_ApplicationSuite]LTInventAgingController[class]\`run():31 at[LT_ApplicationSuite:LT_ApplicationSuite]LTInventAgingController[class]\run() at[Microsoft Corporation:ApplicationPlatform]BatchRun[class]\runJobStaticCodeFromBuffer(Batch buffer) at[Microsoft Corporation:ApplicationPlatform]BatchRun[class]\runJobStaticFromBuffer(Batch buffer) at[Batch]Microsoft.Dynamics.AX.Batch.BatchRunAction\Run() at[Batch]Microsoft.Dynamics.AX.Batch.Batch\ExecuteOneBatchJobTask(BatchTaskInfoWrapper taskInfo) at[Batch]Microsoft.Dynamics.AX.Batch.Batch+<>c__DisplayClass190_0\<ExecuteBatchAndWriteHistory>b__0() at[mscorlib]System.Threading.Tasks.Task\Execute() at[mscorlib]System.Threading.ExecutionContext\RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at[mscorlib]System.Threading.ExecutionContext\Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at[mscorlib]System.Threading.Tasks.Task\ExecuteWithThreadLocal(Task& currentTaskSlot) at[mscorlib]System.Threading.Tasks.Task\ExecuteEntry(Boolean bPreventDoubleExecution) at[Support]Microsoft.Dynamics.Ax.Xpp.ThrottledTaskScheduler\<NotifyThreadPoolOfPendingWork>b__56_0(Object _) at[mscorlib]System.Threading.QueueUserWorkItemCallback\System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at[mscorlib]System.Threading.ThreadPoolWorkQueue\Dispatch()