SSRS 重复组标题?

问题描述:

我有这个数据

DateRecived      JObNumber         REcCnt
20130626          1234               1
20130627          1238               11
20130628          1240               2
20130629          1242               23

我在 ssrs 中的 dateRecieved 上应用了该组,并获得了输出为

I applied the group by on dateRecieved in ssrs and get the output as

DateRecived      JObNumber         REcCnt
20130626          1234               1
20130627          1238               11
20130628          1240               2
20130629          1242               23
                  Total              37

但我希望输出为

DateRecived      JObNumber         REcCnt
20130626          1234               1
                 Total               1
DateRecived      JObNumber         REcCnt
20130627          1238               11
                 Total               11
DateRecived      JObNumber         REcCnt
20130627          1240               2
                  Total              2
DateRecived      JObNumber         REcCnt
20130628          1242               23
                  Total              23

我不知道如何在 SSRS 中重复组标题并计算每个组的总和.

I don't know how to repeat the group header and calculate the sum for each group in SSRS any help would be great .

这是一个带有一些模拟数据的小例子,它应该或多或少地类似于您的情况.

Here's a small example with some mock data that should be more or less analogous to your situation.

数据集:

 Market    SubMarket
 ------    ---------
  A         1
  A         2
  A         3
  B         4
  B         5
  B         6
  B         7

以下是我创建表格的步骤:

Here are the steps I've taken to create the table:

1) 将一个全新的表拖放到设计器中.

1) Drag/drop a new, fresh table to the designer.

2) 将子市场字段拖放到第一列.

2) Drag/drop the SubMarket field to the first column.

3) 右键单击​​详细信息行并添加一个新的父组.

3) Right-click the detail row and add a new parent group.

4) 在市场上分组并选择添加分组标题行.

4) Group on Market and choose to add a group header row.

正如您已经注意到的,SSRS有所帮助"并添加了一个额外的列.

As you've already noted, SSRS "helps" and adds an extra column.

5) 右键单击​​额外的(第一)列并将其删除.

5) Right-click the extra (first) column and delete it.

6) 选择组标题行中的单元格并输入[市场]",或从快速列表中选择.

6) Select the cell in the header row for the group and enter "[Market]", or pick it from the quick-list.

7) 最后填写其他字段/列/单元格.如果标题行拖/放不起作用,您必须自己选择该行的字段(或输入它们").

7) Finish up by filling in the other fields/columns/cells. For the header row drag/drop won't work, you'll have to pick the fields for that row yourself (or type 'em).

这是预览中的结果表(重点放在标题行):

This is the resulting table in preview (with some emphasis on the header row):

对于您的解决方案,除了要应用分组依据的字段之外,您必须在详细信息部分添加所有其他行.

For your solution you have to add all the other rows in detail section other than the fields on which you want to apply the group by.