SSRS 报告错误 - 位置 22 处的字段没有数据

问题描述 投票:0回答:1

调用SSRS报告时发现如下错误。有没有人解决了这个错误,或者有没有办法确定位置 13 是什么字段? :

library!ReportServer_0-36!3074!05/01/2024-15:14:00:: i 信息:RenderForNewSession('/intappopen/conflictsreport_v3')processing!ReportServer_0-36!1e14!05/01/2024-15: 14:00:: e 错误:抛出 Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:、Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:位置 13 处的字段没有数据。;

调用SSRS报告时发现如下错误。有没有人解决了这个错误,或者有没有办法确定位置 13 是什么字段? :

library!ReportServer_0-36!3074!05/01/2024-15:14:00:: i 信息:RenderForNewSession('/intappopen/conflictsreport_v3')processing!ReportServer_0-36!1e14!05/01/2024-15: 14:00:: e 错误:抛出 Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:、Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:位置 13 处的字段没有数据

reporting-services ssrs-2008
1个回答
0
投票

发生这种情况的一种常见情况是,数据集绑定到存储过程,并且在运行时执行查询时,存储过程的结果集与绑定到数据集的字段定义不匹配。

当存储过程被编码为可选地返回不同形状的结果集(通常通过逻辑分支),并且执行期间返回的结果集之一与运行时的数据集字段定义不匹配时,可能会发生这种情况。

CREATE PROCEDURE Fubar(@AntiPatternSelection INT)
AS
IF(@AntiPatternSelection = 1 )
   SELECT NUL, NULL, NULL, NULL
ELSE IF(@AntiPatternSelection = 2 )
   SELECT Field1, Field2, Field3 FROM SomeTable
ELSE IF(@AntiPatternSelection = 3 )
   SELECT * FROM SomeTable2  

这通常可以被视为警告,除非潜在的更改破坏了报告逻辑。

© www.soinside.com 2019 - 2024. All rights reserved.