Tsql SSRS报告生成#错误,无详细信息
这是我的tablix的一个子部分 这些是不可见的列,我将把它们拉到文本框中,以便在其他地方引用。我必须引用的数据必须在主组行中,否则我会收到错误消息 这是A列中的代码Tsql SSRS报告生成#错误,无详细信息,tsql,reporting-services,group-by,sum,iif,Tsql,Reporting Services,Group By,Sum,Iif,这是我的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!seas
=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。true字段中的1不会产生pkg\u due\u amt
产生的错误
这是第一个问题。正如您在701947右侧看到的。这是一个错误
第二个问题是,它在生成/预览时显示为这样。如果查看上图,第一个/常规标题行也会生成一个#错误。这是最高的分组。当我尝试用1替换pkg\u due\u amt
时,它再次起作用,但这没有帮助。我需要的是场的求和
编译错误如下:
这意味着
pkg\u due\u amt
与0
的数据类型不同,可能很简单,一个是int
,一个是decimal
——您可以使用cast函数来解决它,例如CDec(Fields!pkg\u due\u amt.Value),CDec(0)
/p>@dalburrell我看哪里?我看到一个警告列表,所有这些警告基本上都表明给定对象是“透明的”,但我没有看到任何错误消息。@DaleBurrell谢谢。它被作为编译错误输出。我读过了,我仍然不知道如何修复它们。基本上,我们只希望添加符合该标准的所有内容。
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