简体   繁体   English

texbox的SSRS值表达式使用不带范围的聚合表达式。 多个数据集,多个表

[英]SSRS value expression of texbox uses an aggregate expression without a scope. Multiple datasets, multiple tables

I'm building a report that has 2 tables in a page. 我正在建立一个页面中有2个表的报告。 Each table visible in report based on user check box on top of page. 页面顶部基于用户的报表中可见的每个表复选框。

I am displaying Table1 with expression =IIF(Parameters!With_WithoutUpParm.Value = true, true, false) Another table with expression =IIF(Parameters!With_WithUpParm.Value = true, false, true) This works fine..... Now I want to display totalrecords count in textbox below the tables. 我正在用表达式=IIF(Parameters!With_WithoutUpParm.Value = true, true, false)显示Table1,在另一个具有表达式=IIF(Parameters!With_WithUpParm.Value = true, false, true)想要在表格下方的文本框中显示总记录数。 which is SUM(Count(Fields!ID5_DAYS.Value), "DataSet1") SUM(Count(Fields!ID10_DAYS.Value), "DataSet2") whenever the table displays.. But I am getting scope out of range for aggregrate functions error is occurred. 每当表显示时,它就是SUM(Count(Fields!ID5_DAYS.Value), "DataSet1") SUM(Count(Fields!ID10_DAYS.Value), "DataSet2") 。但是,我的范围超出了聚集函数错误的范围发生了。 Can you guys where I am missing? 你们能错过我吗?

A quick tip before I get to the meat of your question... If the parameter is already a boolean, you don't need an IIF in the visibility property. 在您提出问题之前,有个快速提示...如果参数已经是布尔值,则在可见性属性中不需要IIF You can just set the visibility equal to =Parameters!With_WithoutUpParm.Value and =NOT Parameters!With_WithoutUpParm.Value . 您只需将可见性设置为=Parameters!With_WithoutUpParm.Value=NOT Parameters!With_WithoutUpParm.Value

For the actual question, it looks like you're declaring the scope in just the SUM function. 对于实际问题,似乎您只是在SUM函数中声明了作用域。 You'll need to specify the scope in the COUNT function, as well. 您还需要在COUNT函数中指定范围。 I'm not entirely sure that you need to specify scope multiple times, but try it with the scope specified in just the COUNT and add it to the SUM if it doesn't. 我不确定您是否需要多次指定作用域,但是请尝试使用仅在COUNT指定的作用域,如果没有,则将其添加到SUM中。

=SUM(COUNT(Fields!ID5_DAYS.Value, "DataSet1"), "DataSet1")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM