如何根据SSRS中每个页面开头的值按列进行分组

时间:2016-02-22 19:48:26

标签: reporting-services ssrs-2008-r2 ssrs-2012 microsoft-reporting

我正在使用VS2010和Microsoft Report Viewer v11.0.0.0。我想根据我的Facility值对输出数据进行分组。我通过添加行组并将groupby值设置为[Facility]来管理它。它工作正常。我希望所有设施组都在不同的页面中。我还管理了它设置"分页符"在添加的行组的属性中的每个组实例之间。

我的问题是我想要隐藏Facility列,而不是使用Facility:<< * Expression>>在每页的顶部。请注意,设施:<< * Expr>>正在重复每页的顶部。但是,我无法在每个页面上更新表达式。表达式为:Fields!Facility.Value。我目前的输出如下:

Facility:   <<Expr>>> (repeating for each page, <<Expr>> is always X in my case! :( )
-------------Page 1 starts----------
Facility    Name      Age
    X       Jack      28
            John      25
            Jillian   18
-------------Page 1 ends & Page 2 starts-----------
    Y       Brian     19
-------------Page 2 ends & Page 3 starts-----------
    Z       Hossein   20
    Z       Brandon   30
-------------Page 3 ends----------- 

我想要的是:

----------Page 1 starts--------
Facility   X
Name      Age
Jack      28
John      25
Jillian   18
----------Page 1 ends & Page 2 starts-------
Facility    Y
Name       Age
Brian      19 
----------Page 2 ends & Page 3 starts-------
Facility   Z
Name
Hossein    20
Brandon    30

任何帮助都会非常感激!

1 个答案:

答案 0 :(得分:1)

根据您输入当前输出的方式,您需要更改它:

-------------Page 1 starts----------
            Facility:   <<Expr>>> 
Facility    Name      Age
    X       Jack      28
            John      25
            Jillian   18
-------------Page 1 ends & Page 2 starts-----------
            Facility:   <<Expr>>> 
    Y       Brian     19
-------------Page 2 ends & Page 3 starts-----------
            Facility:   <<Expr>>> 
    Z       Hossein   20
    Z       Brandon   30
-------------Page 3 ends----------- 

然后进入组的高级视图并隐藏包含第一个可见列的组&#34;设施X /设施Y /等&#34;。

修改

如果选择了Tablix,您应该在其左侧看到类似的内容:

enter image description here

您需要在行上方插入Facility: <<Expr>>行,其中包含3条小水平线。