Repeating Table Header on Each Page of the Report in the SSRS 2008

In the SSRS 2008, if a report with a tablix is created without using the wizard feature (Reports -> Add -> New Item -> Report), table headers won’t repeat on every page by default when you print or export or print preview the report. To configure the repeat table header in this scenario, you can change the xml behind the RDL file.

Search for TablixRowHierarchy for the given Tablix control and look for the section with a TablixMember and KeepWithGroup

        <TablixRowHierarchy>
          <TablixMembers>
            <TablixMember>
              <KeepWithGroup>After</KeepWithGroup>
            </TablixMember>
            <TablixMember>
              <Group Name=”Details2″ />
            </TablixMember>
          </TablixMembers>
        </TablixRowHierarchy>

Update the TablixMember with two additional element properties – RepeatOnNewPage and KeepTogether.

        <TablixRowHierarchy>
          <TablixMembers>
            <TablixMember>
              <KeepWithGroup>After</KeepWithGroup>
              <RepeatOnNewPage>true</RepeatOnNewPage>
              <KeepTogether>true</KeepTogether>
            </TablixMember>
            <TablixMember>
              <Group Name=”Details2″ />
            </TablixMember>
          </TablixMembers>
        </TablixRowHierarchy>

Save the RDL file and repeating header rows should be visible when you print preview, print, or export the report.

On the side note, I have heard that if a report with a tablix is created using the wizard feature (In Solution Explorer, right click on Reports –> Add New Report), table headers will repeat on every page by default when you print, print preview, or export the report. I haven’t tested this feature but something to keep in mind.

Advertisements
This entry was posted in SSRS 2008. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s