Hi all, this might be a shot in the dark, but I'm looking for help on sorting out an error that resides in either a report data definition or the Sequel Server Reporting Services (SSRS) report form. The error is preventing a particular form (customized packing slip) from printing when we have multiple lines. Just to note, the report form is designed using Microsoft Report Builder, and gets it data from Epicor which has an associated "Report Data Definition". The consultant who customized the packing slip is no longer reachable, and without his notes I'm trying to figure ou[enter image description here][1]t what was changed from the original data definition or report form that could have caused this error.
Okay, now on to the problem:
Upon trying to print a multiple line item packing slip, we get this error:
Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message:
RunTask: CREATE VIEW failed because column 'OTSCity' in view 'RptLabels_8B03042B0E8248588E5DECCC9D76BB89' exceeds the maximum of 1024 columns.
Some information I've gathered during my hunting and pecking:
OTSCITY is a field in the OrderHED table (Order Header). The OrderHed table is one of the (25) report tables in the data definition, however it doesn't look like it's linked to any other table, and the field 'OTSCITY' is excluded (both label and column) in both the original and custom report
Not sure what 'RptLabels' refers to, but the long number that follows is the Table GUID. Everytime a report gets printed, a unique GUID is assigned to that particular instance. I'm guessing when a report gets printed it pulls the data from the data definition, and that snapshot of data is assigned with the GUID. So essentially it's referring to the report labels (RptLabels) in the pack slip instance I created when I hit the print button. That's just my guess.
I'm pretty sure the report forms have a limit to how many columns they can show, which is set to 1024, so perhaps some data table is returning too many columns when we try to make a packing slip form with multiple line items.
I'm leaving the rest of the Stack Trace at the bottom of this post in case you're a Epicor/SSRS/SQL wizard that can read that stuff. Pictures of the Report data definition are there as well.
Stack Trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Ice.Core.RptBase.RptLabelsSqlTableBuilder.BuildView(SqlObjectsCreated sqlObjectsCreated) in c:\_Releases\ICE\3.1.400.0\source\Server\Internal\Lib\TaskLib\RptBase\RptLabelsSqlTableBuilder.cs:line 100
at Ice.Core.RptBase.ReportDatabaseBuilder 1.BuildSchemaAndWriteData(Func 2 executeCommand, SqlObjectsCreated sqlObjectsCreated) in c:\_Releases\ICE\3.1.400.0\source\Server\Internal\Lib\TaskLib\RptBase\ReportDatabaseBuilder.cs:line 165
at Ice.Core.RptBase.ReportDatabaseBuilder`1.GenerateSqlObjectsAndProcessReport(SqlConnection connection) in c:\_Releases\ICE\3.1.400.0\source\Server\Internal\Lib\TaskLib\RptBase\ReportDatabaseBuilder.cs:line 191
at Ice.Core.RptBase.ReportDatabaseBuilder`1.XMLClose() in c:\_Releases\ICE\3.1.400.0\source\Server\Internal\Lib\TaskLib\RptBase\ReportDatabaseBuilder.cs:line 132
at Ice.Core.RptTaskBase`1.XMLClose() in c:\_Releases\ICE\3.1.400.0\source\Server\Internal\Lib\TaskLib\RptBase\RptTaskBase.cs:line 134
at Erp.Internal.SR.PackingSlipPrint.RunProcess(Int64 Instance_TaskNum, String OutputFile) in c:\_Releases\ERP\RL10.1.400.0\Source\Server\Internal\SR\PackingSlipPrint\PackingSlipPrint.cs:line 919
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in c:\_Releases\ICE\3.1.400.7\source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 78
at Ice.Hosting.TaskCaller.ExecuteTask(Boolean suppressTransaction) in c:\_Releases\ICE\3.1.400.7\source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 31
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in c:\_Releases\ICE\3.1.400.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.400.7\source\Server\Services\Lib\RunTask\RunTask.cs:line 477
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in c:\_Releases\ICE\3.1.400.7\source\Server\Services\Lib\RunTask\RunTask.cs:line 477
at Ice.Services.Lib.RunTaskSvcFacade.RunTask(Int64 ipTaskNum) in c:\_Releases\ICE\3.1.400.7\source\Server\Services\Lib\RunTask\RunTaskSvcFacade.cs:line 97
at SyncInvokeRunTask(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in c:\_Releases\ICE\3.1.400.7\source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in c:\_Releases\ICE\3.1.400.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.400.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.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.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)
[RDD OrderHed Table Exclusions][1]
It appears that you may have too many column labels in your customized report. Each column will have an optional label (Prompt/Heading) and Epicor creates a view with all these labels in it for use in the report. The standard Pack Slip in E10.0 has 904 columns in it which is far more than are actually used on the report. Have they added a lot more fields to the report? Admittedly an extra 120 columns is a lot if no additional tables were added.
You can check the number of columns in the EpicorSSRS database in SQL by using the Object Explorer Details and sorting the views by the create date/time to find the temp view you just created (after running the report). Run this query in the EpicorSSRS database to count the number of columns:
select count(*),c.table_name
from information_schema.COLUMNS c
JOIN information_schema.tables t ON c.TABLE_NAME = t.TABLE_NAME
AND c.TABLE_Schema = t.TABLE_Schema
WHERE TABLE_TYPE = 'view'
and t.Table_name = 'RptLabels_710812BD643A4097900608B397D0779A'
GROUP BY c.table_name
Obviously if it is failing, then the view won't be created, but try unchecking some of the unused labels in the RDD until you get to a point where it will run.
I don't know why having multiple lines on your pack slip would increase the number of fields. Your general understanding of how the reporting works is correct.