Epicor 10 (ERP) SSRS Reporting Error: Maximum of 1024 columns returned

Epicor 10 (ERP) SSRS Reporting Error: Maximum of 1024 columns returned

大家好,这可能是无稽之谈,但我正在寻求帮助来解决报告数据定义或 Sequel 服务器中存在的错误Reporting Services (SSRS) 报表。当我们有多行时,错误是阻止打印特定表格(定制装箱单)。 请注意,报表是使用 Microsoft Report Builder 设计的,并从具有关联 "Report Data Definition" 的 Epicor 获取数据。 无法联系到定制装箱单的顾问,没有他的笔记,我正试图弄清楚[在此处输入图片描述][1] 原始数据定义或报告表格的哪些更改可能导致此错误.

好了,下面进入正题:

尝试打印多行项目装箱单时,我们收到此错误:

程序 Ice.Services.Lib.RunTask 引发意外异常并显示以下消息:

RunTask:CREATE VIEW 失败,因为视图 ​​'RptLabels_8B03042B0E8248588E5DECCC9D76BB89' 中的列 'OTSCity' 超过了 1024 列的最大值。

我在狩猎和啄食过程中收集到的一些信息:

OTSCITY 是 OrderHED table(订单 Header)中的一个字段。 OrderHed table 是数据定义中的 (25) 个报告 table 之一,但它看起来不像是链接到任何其他 table,字段 'OTSCITY' 在原始报告和自定义报告中都被排除(包括标签和列)

不确定 'RptLabels' 指的是什么,但后面的长数字是 Table GUID。每次打印报告时,都会为该特定实例分配一个唯一的 GUID。我猜当一份报告被打印出来时,它会从数据定义中提取数据,并且数据的快照被分配了 GUID。所以本质上它指的是我在点击打印按钮时创建的装箱单实例中的报告标签 (RptLabels)。这只是我的猜测。

我很确定报告表单对它们可以显示的列数有限制,设置为 1024,所以当我们尝试制作包含多个行项目的装箱单表单。

我将 Stack Trace 的其余部分留在此 post 的底部,以防您是可以阅读这些内容的 Epicor/SSRS/SQL 向导。报告数据定义的图片也在那里。

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.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.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.1.400.0\source\Server\Internal\Lib\TaskLib\RptBase\ReportDatabaseBuilder.cs:line 191
   at Ice.Core.RptBase.ReportDatabaseBuilder`1.XMLClose() in c:\_Releases\ICE.1.400.0\source\Server\Internal\Lib\TaskLib\RptBase\ReportDatabaseBuilder.cs:line 132
   at Ice.Core.RptTaskBase`1.XMLClose() in c:\_Releases\ICE.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.1.400.7\source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 78
   at Ice.Hosting.TaskCaller.ExecuteTask(Boolean suppressTransaction) in c:\_Releases\ICE.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.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.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.1.400.7\source\Server\Services\Lib\RunTask\RunTask.cs:line 477
   at Ice.Services.Lib.RunTaskSvcFacade.RunTask(Int64 ipTaskNum) in c:\_Releases\ICE.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.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.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.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 排除项][1]

这是 Pinal Dave 在 SQL Server 的 Sparce Columns. I bet the problem you are having is because the table does not define a COLUMN_SET FOR ALL_SPARSE_COLUMNS. See this 文章中的摘要,以了解更多详细信息。

您的自定义报告中的列标签似乎过多。每列都有一个可选标签 (Prompt/Heading),Epicor 创建一个包含所有这些标签的视图以供在报告中使用。 E10.0 中的标准 Pack Slip 有 904 列,远远超过报告中实际使用的数量。他们是否在报告中添加了更多字段?诚然,如果不添加额外的表,额外的 120 列是很多的。

您可以在 SQL 中检查 EpicorSSRS 数据库中的列数,方法是使用对象资源管理器详细信息并按创建 date/time 对视图进行排序以找到您刚刚创建的临时视图(之后运行宁报告)。 运行在EpicorSSRS数据库中查询统计列数:

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

显然,如果失败,则不会创建视图,但请尝试取消选中 RDD 中的一些未使用的标签,直到达到 运行.

我不知道为什么在您的装箱单上写多行会增加字段数。您对报告工作原理的一般理解是正确的。