Share via


SSRS: How to Repeat Headers for Each Group

This article is going to share the information on:

  1. how to repeat headers for each group
  2. how to overcome this error:

"An error occurred during local report processing .
The definition of the report '/Report ' is invalid .
The tablix 'Tablix' has a detailed member with inner members. Detail members can only contain static inner members."

For example, consider the following sample data:

DECLARE @Tmp TABLE (Country VARCHAR(30),City VARCHAR(30),Population INT) 
INSERT @Tmp SELECT 'India','CHN',100 
INSERT @Tmp SELECT 'India','MUM',400 
INSERT @Tmp SELECT 'India','KOL',300 
INSERT @Tmp SELECT 'US','NY',100 
INSERT @Tmp SELECT 'US','CAL',300 
SELECT * FROM @Tmp

Create Data source (providing server name, login credentials & database name) and then create Dataset as shown below:

 Drag & drop List from Toolbox (or right-click on report body Insert - > List) on to the report body
and then drag & drop Table from Toolbox inside the List as shown below:

Then assign Dataset columns to the report Table columns:

After assigning columns, if we preview the report we will end up with the error shown below:

Again go to the Design Pane, click on the List - > at the bottom, go to Row Groups - > =(Details) ->
in the drop down list click on **Group Properties ... **
Under Group Properties, follow the settings as shown in images below:

Now again click on Preview Pane and you will notice headers repeated for each group:

See Also

  • My SSRS Articles