SSRS报告给我一个汇总错误

时间:2019-08-10 15:06:01

标签: reporting-services ssrs-2008 reporting-services-2016

尝试在SSRS中进行一些数学运算并得到此错误。

The Value expression for the text box ‘totalboxes3’ has an inner aggregate in an outer aggregate that specifies a dataset scope.  An aggregate that specifies a dataset scope cannot contain other aggregates.

我正在使用表达式:

=Sum(Fields!GP_Goal.Value, "Main") / Sum(Sum(Fields!Smartphone_Postpaid.Value) - Sum(Fields!CPE_Postpaid_Only.Value), "Main")

我对SSRS非常陌生,因此我试图了解这是在问我什么以及如何解决它。

我也尝试过

=Sum(Fields!GP_Goal.Value, "Main") / Sum(Sum(Fields!Smartphone_Postpaid.Value, "Main") - Sum(Fields!CPE_Postpaid_Only.Value, "Main"))

1 个答案:

答案 0 :(得分:0)

问题是这样的:

Sum(Sum(Fields!Smartphone_Postpaid.Value) - Sum(Fields!CPE_Postpaid_Only.Value)

不需要外部SUM,只需减去总和并在总和内指定数据集:

=Sum(Fields!GP_Goal.Value, "Main") / (Sum(Fields!Smartphone_Postpaid.Value, "Main") - Sum(Fields!CPE_Postpaid_Only.Value, "Main"))
相关问题