报表项表达式只能引用同一分组范围或包含分组范围内的其他报表项

Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope

我有一个报告,其中有几个静态行,每行都有自己的过滤器和组,字段 Prem 是根据为每个行组设置的过滤器计算的。 我需要将所有行汇总为一个总数:

=ReportItems!TextBox248.Value + ReportItems!TextBox249.Value + ReportItems!TextBox250.Value + 
 ReportItems!TextBox251.Value + ReportItems!TextBox252.Value + ReportItems!TextBox253.Value + 
 ReportItems!TextBox254.Value

但是,当我 运行 报告时出现此错误:

The Value expression for the text box ‘Textbox267’ refers to the report item ‘TextBox248’. Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope. Letters in the names of report items must use the correct case.

这里的解决方案确实非常简单,但 SSRS 区分大小写。看起来您的表达式使用 TextBox,而文本框的名称实际上是 Textbox。很简单,你应该使用这个表达式。

=ReportItems!Textbox248.Value + ReportItems!Textbox249.Value + ReportItems!Textbox250.Value + 
 ReportItems!Textbox251.Value + ReportItems!Textbox252.Value + ReportItems!Textbox253.Value + 
 ReportItems!Textbox254.Value