SSRS Repeating group headers?

16,018

Solution 1

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

The dataset:

 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) Drag/drop a new, fresh table to the designer.

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

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

enter image description here

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

enter image description here

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

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

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

enter image description here

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):

enter image description here

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.

Solution 2

You need a group footer. Currently you have table footer which shows grand total.

  1. Right click the detail group section and select insert row.
  2. Click outside group - below. (This will add a footer)
  3. In the footer under REccCt and set the expression as =SUM(Fields!REcCnt.Value)

If you don't want to show the grand total 37 you can delete the table footer not the group footer you just created.

Update Reread your question. You also need a group header along with group footer.

Share:
16,018
Admin
Author by

Admin

Updated on June 12, 2022

Comments

  • Admin
    Admin almost 2 years

    I have this data

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

    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
    

    But i want the output as

    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
    

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

  • briskovich
    briskovich over 10 years
    This is a great trick!! I fought with trying to do this very thing for an hour!!