没有详细信息的 SSRS 报告生成#Error
SSRS Report generating #Error without details
这是我的 tablix 的一个子部分。
这些是不可见的列,我会将它们拉出到文本框中,以便我可以在其他地方引用。我必须引用的数据必须位于主组行中,否则我会收到错误消息。
这是A列的代码
=Sum(iif(Parameters!season.Value = Fields!season.Value, Fields!pkg_due_amt.Value, 0))
这是 B 列中的代码,它会产生错误。
=Sum(iif(Fields!inDateRange.Value = TRUE and Parameters!season.Value = Fields!season.Value, Fields!pkg_due_amt.Value, 0))
如果我在 B 列中进行调整,我会得到以下代码:
=Sum(iif(Fields!inDateRange.Value = TRUE and Parameters!season.Value = Fields!season.Value, 1, 0))
上面两行之间的唯一区别是我试图对字段 pkg_due_amt
而不是 1 求和。真实字段中的 1 不会生成错误 pkg_due_amt
做。
这是第一期。如您所见,在 701947. 的右侧是一个#Error。
第二个问题是在generated/previewed的时候是这样的。如果您查看上图,first/general header 行也会生成 #Error。那就是最顶层的最高分组。当我尝试用 1 替换 pkg_due_amt
时,它再次起作用,但这没有帮助。我需要的是该领域的总结。
编译错误如下:
Warning 1 [rsAggregateOfMixedDataTypes] The Value expression for the textrun ‘Textbox794.Paragraphs[0].TextRuns[0]’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type. ... 0 0
Warning 2 [rsAggregateOfMixedDataTypes] The Value expression for the textrun ‘Textbox814.Paragraphs[0].TextRuns[0]’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type. ... 0 0
Warning 3 [rsAggregateOfMixedDataTypes] The Value expression for the textrun ‘Textbox789.Paragraphs[0].TextRuns[0]’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type. ... 0 0
这意味着 pkg_due_amt
与 0
的数据类型不同,可能就像一个 int
和一个 decimal
一样简单 - 你解决了它通过使用强制转换函数,例如CDec(Fields!pkg_due_amt.Value), CDec(0)
这是我的 tablix 的一个子部分。
这些是不可见的列,我会将它们拉出到文本框中,以便我可以在其他地方引用。我必须引用的数据必须位于主组行中,否则我会收到错误消息。
这是A列的代码
=Sum(iif(Parameters!season.Value = Fields!season.Value, Fields!pkg_due_amt.Value, 0))
这是 B 列中的代码,它会产生错误。
=Sum(iif(Fields!inDateRange.Value = TRUE and Parameters!season.Value = Fields!season.Value, Fields!pkg_due_amt.Value, 0))
如果我在 B 列中进行调整,我会得到以下代码:
=Sum(iif(Fields!inDateRange.Value = TRUE and Parameters!season.Value = Fields!season.Value, 1, 0))
上面两行之间的唯一区别是我试图对字段 pkg_due_amt
而不是 1 求和。真实字段中的 1 不会生成错误 pkg_due_amt
做。
这是第一期。如您所见,在 701947. 的右侧是一个#Error。
第二个问题是在generated/previewed的时候是这样的。如果您查看上图,first/general header 行也会生成 #Error。那就是最顶层的最高分组。当我尝试用 1 替换 pkg_due_amt
时,它再次起作用,但这没有帮助。我需要的是该领域的总结。
编译错误如下:
Warning 1 [rsAggregateOfMixedDataTypes] The Value expression for the textrun ‘Textbox794.Paragraphs[0].TextRuns[0]’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type. ... 0 0
Warning 2 [rsAggregateOfMixedDataTypes] The Value expression for the textrun ‘Textbox814.Paragraphs[0].TextRuns[0]’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type. ... 0 0
Warning 3 [rsAggregateOfMixedDataTypes] The Value expression for the textrun ‘Textbox789.Paragraphs[0].TextRuns[0]’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type. ... 0 0
这意味着 pkg_due_amt
与 0
的数据类型不同,可能就像一个 int
和一个 decimal
一样简单 - 你解决了它通过使用强制转换函数,例如CDec(Fields!pkg_due_amt.Value), CDec(0)