如何仅显示唯一的子项及其计数

How to display only unique child items and their count

我有一个包含两个字段的数据集的 ssrs 报告。我在字段 1 上分组,然后在字段 2 上分组,现在我只想显示子组中每个唯一项的计数。

这是数据集的样子

Route  Driver
A      Adam
A      Adam
A      John
B      Adam
A      John

and so on

这是我试图使我的报告看起来像的样子


Route    Driver    Count

A

         Adam      Count of number of times Adam appears in this child group.
         John      Count of John
         Total    total for all


B      
         Adam      25
         Mike       5
         Total      total


C

         Josh       10

and so on

然而,这是目前的样子。

Route    Driver    Count

A

         Adam      count
                   count
                   count
                   count
                  continues till the number of times Adam appears




B      
         Adam      25
                   25
                   25
                   25
                   continues 25 times

         Mike       5
                    continues 5 times


C

         Josh       10 
                    continues 10 times



这是我的设计图

关于如何做到这一点有什么建议吗?我也愿意修改我的数据集。

插入一个矩阵,添加路线和driver作为行组。在最右边的列中输入表达式:=count(Fields!Driver.Value)

在您的 table 中,您应该有两个级别的分组 - 在路线上,然后在 Driver 上 - 并且没有详细信息行。 Route 组的行标题有 header,小计有页脚,而 Driver 组可以只有页脚行,不需要 header。

然后在每个组页脚上添加您的 Count 表达式。

@Caesar Tex,将每条路线的司机总数添加为 header: