44
votes

So I've got various reports that consist of a DataSet rendered in a Tablix... pretty garden variety stuff. There is a property for the Tablix control named RepeatColumnHeaders, which I have set to True for each report in question. The explanation for this property states “Indicates whether column headers are repeated on each page on which part of the data region appear.” Sounds pretty straightforward, but on some reports it works and on others it does not. I can't seem to find what's different about the reports that might affect this. On one report where the headers do repeat, there is some fairly arcane grouping mojo, but in an example where it doesn't work the Tablix only has one level--no grouping. I would expect the multi-nested one to be the problem, not the flat one.

Maybe it's a different problem altogether. I threw together a simple Tablix rendering SELECT * FROM Foo, accepted all the default values, which results in RepeatColumnHeaders being set to False, and lo and behold the column headers do repeat for that report... Grrr.

Any insights greatly appreciated.

7
Are there any service packs/bug fixes that resolve this?Jeff
There's an open Microsoft Connect issue here connect.microsoft.com/SQLServer/feedback/…Sophia

7 Answers

48
votes

It's a bit wonky from what I've managed to dig up. In your grouping pane, select advanced mode, then select your outermost static row. You should then see the "RepeatOnNewPage" property.

Update: finding Advanced Mode:
The comment by @HCL links to the other answer by @user359904, that has the info on how to find and enter Advanced Mode:

  1. Select the tablix
  2. Below the report are "Row Groups" and "Column Groups", all the way to the right of "Column Groups" is a small downward arrow.
  3. Click the arrow, choose Advanced Mode.
16
votes

I found a solution that works for me. Vinny's answer led me to it.

Thankfully, I didn't have to recreate my tablix. I had three rows that made up my tablix header. I added three rows outside of the highest level group. These rows are not bound to any group. I modified the rows so that they exactly duplicated the header rows I had in my highest level group. I set the KeepWithGroup property to "After" and the "RepeatOnNewPage" property to true for each of these header rows. I tested the report. The header appeared at the top of every page but due to the duplication of the header rows both inside the highest level group and above the highest level group, the header repeated twice at the top of the first page and at every section break. I deleted the header rows in the topmost section and the duplication went away. Headers repeat correctly at the each break of the highest level group and at the top of each page. There are no header rows in the highest level group.

To set KeepWithGroup and RepeatOnNewPage: Select the tablix. In the group box below the design pane, click on the down arrow to the right of the text that reads "Column Groups" and make sure "Advanced Mode" is checked. Click the first static row and set the KeepWithGroup property to "After" and "RepeatOnNewPage" to true. Do that for each of the rows that comprise your header.

14
votes

Sorry to beernuts for un-marking your response as the answer; I hope you get to keep the rep points.

The plot thickens. In three tests I found a 1:1 correlation between using the wizard to create a report and getting the desired header behavior, as well as between not using the wizard and not being able to achieve the desired behavior. From there I diff'd the rdl files for a working and non-working example and found this element:

<RepeatOnNewPage>true</RepeatOnNewPage>

In the document at:

Report > Body > ReportItems > Tablix > TablixBody > TablixRowHierarchy 
  > TablixMembers > TablixMember

I added the same to the non-working rdl and the headers started repeating.

I cannot, however, find a setting, property, etc in the designer that toggles this. It does not seem to correspond at all to the obvious properties as described previously. Is it just an artifact of the wizard? Fortunately it's a fairly easy work-around as I couldn't face recreating a dozen reports using the wizard.

11
votes

Your post is still being used ;) Thank you all. I built upon what you provided to come up with a solution to restore repeating header rows. I did not have to use the Advanced mode, just some insight... I had two title rows outside all row groups with no column groups. Here is what I did to get the two title rows into the tablix header:

  1. Right click on one title row and "Add Group (Column Group)", Parent Group
  2. Group by '1' (this group will later be deleted so it doesn't matter what you put there
  3. Click OK and the a Header row is added.
  4. Merge all columns in the new header row
  5. In the column group pane, right click on group just created and "Delete Group", select box for "group only" important
  6. Now you have header row you can insert row above or below to add more header lines.
  7. Move your title rows into the new header rows and delete your old title rows.
  8. Last... make sure you check the Tablix property to "Repeat Column Headers on each page"

It worked well and easily repeatable (I had many tablixes).

Sincerely, Alan

2
votes

In your reports where the header doesn't repeat, did you delete the default header row in the tablix at any point? Once I did that, no matter what setting I tried, the header in the tablix wouldn't repeat. I had to re-create the tablix to get it to work.

1
votes

It's now the year 2014 and I'm running 2012 version and I used your post to solve my problem - one that experienced SSRS developer in our shop didn't know how to solve (I'm just a newbie). Thanks so much for contributing your solution - it seems to be a timeless issue.

1
votes

I am adding some screenshots from my SSRS 2012 server..

enter image description here

Now, click on the "(Static)" under "Row Groups" and presss F4.

enter image description here

Also read TechNet - SSRS: How to Repeat Headers on Each Page