我正在sql server 2012中开发报告(使用报告向导),该报告有5列,这些列是在运行时在tablix表中计算的。
它们按行方式分组,总行应显示在组总计的行中。
我试图让表达式找到列总和为" Sum(ReportItems!totalcolumn1.Value)"。报告为tablix中不允许的聚合函数抛出错误。请建议,找到计算列总和的最佳方法是什么?
我的计算列b2的公式为:=
IIF(IsNothing(Parameters!AgeDueDate.Value),
IIF(((Parameters!AgeBreaks.Value(0) = 1 AND Fields!adItemAgeByDueDate.Value > Parameters!AgeBreak1.Value(0) ) OR
(Parameters!AgeBreaks.Value(0) > 1 AND Fields!adItemAgeByDueDate.Value> Parameters!AgeBreak1.Value(0) AND Fields!adItemAgeByDueDate.Value <= Parameters!AgeBreak2.Value(0)))
,Fields!exCalculatedReportingOpenAmount.Value,0),
IIF(
(Parameters!AgeBreaks.Value(0) = 1 AND Fields!adItemAgeByItemDate.Value > Parameters!AgeBreak1.Value(0) ) OR
( Parameters!AgeBreaks.Value(0) > 1 AND Fields!adItemAgeByItemDate.Value> Parameters!AgeBreak1.Value(0) AND Fields!adItemAgeByItemDate.Value <= Parameters!AgeBreak2.Value(0)) ,Fields!exCalculatedReportingOpenAmount.Value,0)
)
非常感谢。