不要根据条件显示行,而是在父组中显示总和值

时间:2014-08-12 09:00:56

标签: reporting-services ssrs-2008

说我正在使用以下结果集:

+---------+-------------+------------+
|  Group  | Groupmember | Production |
+---------+-------------+------------+
| Group A | Member 1    |          5 |
| Group A | Member 2    |          3 |
| Group B | Member 3    |          2 |
| Group B | Member 4    |          5 |
| Group C | Member 5    |          1 |
+---------+-------------+------------+

对列进行分组将生成以下语法的报告:

+---------+-------------+------------+
|  Group  | Groupmember | Production |
+---------+-------------+------------+
| Group A |             |          8 |
|         | Member 1    |          5 |
|         | Member 2    |          3 |
| Group B |             |          7 |
|         | Member 3    |          2 |
|         | Member 4    |          5 |
| Group C |             |          1 |
|         | Member 5    |          1 |
+---------+-------------+------------+

现在我尝试仅在生产> = 5 的情况下显示详细信息,但我想计算该组的每条记录。预期:

+---------+-------------+------------+
|  Group  | Groupmember | Production |
+---------+-------------+------------+
| Group A |             |          8 |
|         | Member 1    |          5 |
| Group B |             |          7 |
|         | Member 4    |          5 |
| Group C |             |          1 |
+---------+-------------+------------+

然后在detailrow上使用过滤器会导致生成未在组中求和。

如何根据条件显示记录,但在父组中将它们相加?

1 个答案:

答案 0 :(得分:2)

您是正确的,过滤器不起作用,但您可以设置详细信息行的可见性以满足您的要求。

我根据您的数据创建了一个简单的表格,它提供了如上所示的完整结果:

enter image description here

enter image description here

enter image description here

现在,设置详细信息行的可见性:

enter image description here

右键单击,然后将隐藏表达式设置为:

=IIf(Fields!Production.Value >= 5, False, True)

现在您获得了所需的结果:

enter image description here