Error on service call status report

When we run some service call status report with CSV format, we got the following error. I believe this happens only for some service calls. Anyone knows why and please help. Thanks.

Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask: Error: Subreport could not be shown. —> Microsoft.ReportingServices.ReportProcessing.HandledReportRenderingException: Error: Subreport could not be shown. —> System.Exception: For more information about this error navigate to the report server on the local server machine, or enable remote errors
Stack Trace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Ice.Core.SsrsReportService.ReportExecutionService.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds) in C:_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\Web References\SsrsReportService\Reference.cs:line 633
at Ice.Core.SsrsReporting.SsrsRendererBase.Render(SsrsRenderInformationBase renderInformation) in C:_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\SsrsReporting\SsrsRendererBase.cs:line 142
at Ice.Core.SsrsReporting.SsrsRendererBase.<>c__DisplayClass12_0.b__0() in C:_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\SsrsReporting\SsrsRendererBase.cs:line 87
at Epicor.Hosting.Trace.TraceHandle.TimeAction(Action actionToTime) in C:_Releases\ICE\3.1.500.7\Source\Framework\Epicor.System\Hosting\Trace\TraceHandle.cs:line 92
at Epicor.Hosting.Trace.TraceHandle.AddTimedIfEnabled(String traceFlag, Action actionToTime, Func2 messageBuilder) in C:\_Releases\ICE\3.1.500.7\Source\Framework\Epicor.System\Hosting\Trace\TraceHandle.cs:line 39 at Ice.Core.SsrsReporting.SsrsRendererBase.TraceReportRendered(String printProgram, String ssrsRenderFormat, Func1 timedAction) in C:_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\SsrsReporting\SsrsRendererBase.cs:line 95
at Ice.Core.SsrsReporting.ReportProcessorBase1.RenderReportForPreviewOrGenerate(RenderedSsrsReport renderedReport) in C:\_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\SsrsReporting\ReportProcessorBase.cs:line 307 at Ice.Core.SsrsReporting.ReportProcessorBase1.ProcessReportPart(String reportLocation) in C:_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\SsrsReporting\ReportProcessorBase.cs:line 169
at Ice.Core.SsrsReporting.StandardReportProcessor1.ProcessReportParts() in C:\_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\SsrsReporting\StandardReportProcessor.cs:line 33 at Ice.Core.RptBase.ReportSsrsDatabaseBuilder1.<>c__DisplayClass10_0.b__0(ReportInstanceInformation instance) in C:_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\RptBase\ReportSsrsDatabaseBuilder.cs:line 231
at Ice.Core.RoutingAndBreaking.ReportPersister.Persist(ReportInstanceInformation reportInstance, Func2 reportsRenderer, Action1 fillSysRptLstRow, Action2 processReport) in C:\_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\ReportPersister.cs:line 44 at Ice.Core.RptBase.ReportSsrsDatabaseBuilder1.ProcessUnroutedReport() in C:_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\RptBase\ReportSsrsDatabaseBuilder.cs:line 233
at Ice.Core.RptBase.ReportDatabaseBuilder1.XMLClose() in C:\_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\RptBase\ReportDatabaseBuilder.cs:line 142 at Ice.Core.RptTaskBase1.XMLClose() in C:_Releases\ICE\3.1.500.7\Source\Server\Internal\Lib\TaskLib\RptBase\RptTaskBase.cs:line 130
at Erp.Internal.FS.ServiceCallStatus.RunProcess(Int64 instanceTaskNum, String outputFileName) in c:_Releases\ERP\RL10.1.500\Source\Server\Internal\FS\ServiceCallStatus\ServiceCallStatus.cs:line 348
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_Releases\ICE\3.1.500.7\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 93
at Ice.Hosting.TaskCaller.ExecuteTask() in C:_Releases\ICE\3.1.500.7\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 54
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_Releases\ICE\3.1.500.7\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_Releases\ICE\3.1.500.7\Source\Server\Services\Lib\RunTask\RunTask.cs:line 526
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_Releases\ICE\3.1.500.7\Source\Server\Services\Lib\RunTask\RunTask.cs:line 526
at Ice.Services.Lib.RunTaskSvcFacade.RunTask(Int64 ipTaskNum) in C:_Releases\ICE\3.1.500.7\Source\Server\Services\Lib\RunTask\RunTaskSvcFacade.cs:line 87
at SyncInvokeRunTask(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func2 func) in C:\_Releases\ICE\3.1.500.7\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59 at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func2 func) in C:_Releases\ICE\3.1.500.7\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28
at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in C:_Releases\ICE\3.1.500.7\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SecurityChannelListener1.ReceiveItemAndVerifySecurityAsyncResult2.InnerTryReceiveCompletedCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Is this a custom report? If so, does the sub report work at all in PDF? If no, delete it as you are not using it.
Also, not sure how Sub Reports would even work in a CSV output.

Jason,
Thank you. This is not a custom report. The PDF format works fine all the time. Also the report works most of time for CSV format.

I would offer that the SubReport needs to be filtered out when using CSV. Here is a “Hidden” expression you can use.

=IIF(Globals!RenderFormat.Name = "CSV", True, False)