168

I have a tablix with lots of rows that span over multiple pages. I have set the Tablix property Repeat header rows on each page but this does not work. I read somewhere that this is a known bug in Report Builder 3.0. Is this true? If not, is there something else that needs to be done?

Ayrton Senna
  • 3,385
  • 5
  • 30
  • 45

6 Answers6

440

It depends on the tablix structure you are using. In a table, for example, you do not have column groups, so Reporting Services does not recognize which textboxes are the column headers and setting RepeatColumnHeaders property to True doesn't work.

Instead, you need to:

  1. Open Advanced Mode in the Groupings pane. (Click the arrow to the right of the Column Groups and select Advanced Mode.)
    • Screenshot
  2. In the Row Groups area (not Column Groups), click on a Static group, which highlights the corresponding textbox in the tablix. Click through each Static group until it highlights the leftmost column header. This is generally the first Static group listed.
  3. In the Properties window, set the RepeatOnNewPage property to True.
    • Screenshot
  4. Make sure that the KeepWithGroup property is set to After.

The KeepWithGroup property specifies which group to which the static member needs to stick. If set to After then the static member sticks with the group after it, or below it, acting as a group header. If set to Before, then the static member sticks with the group before, or above it, acting as a group footer. If set to None, Reporting Services decides where to put the static member.

Now when you view the report, the column headers repeat on each page of the tablix.

This video shows how to set it exactly as the answer described.

KyleMit
  • 45,382
  • 53
  • 367
  • 544
Stacia
  • 6,638
  • 2
  • 15
  • 10
  • 2
    Stacia, when I select KeepWithGroup and try to save, I get "The tablix 'DetailTablix' has an invalid TablixMember. All TablixMember elements in a TablixColumnHierarchy must have the RepeatOnNewPage property set to false.". Any ideas? – moodboom Nov 19 '12 at 19:43
  • 26
    I figured out my problem. Stacia your answer is absolutely correct, it's just a tricky thing to get just right. Note that Stacia says to change the ROW Groups area when setting the RepeatOnNewPage property. Everything else about this solution deals with columns, but you need to pick the Row groups (on the left), not the Column groups (on the right), even though you start by clicking the dropdown in Columns. Thanks Stacia, brilliant. – moodboom Nov 20 '12 at 13:55
  • 6
    +1 - I just finished reading about a dozen walkthroughs on this all over the internet, and this is the best most direct resolution to the issue - you also explain WHY the options matter, which is fantastic. Thanks! – JNK Jun 10 '13 at 19:06
  • 3
    this video shows how to set it exactly as the answer described: http://www.youtube.com/watch?v=WAO819-gkKw – shrimp rice Oct 09 '13 at 16:11
  • 1
    @shrimprice i wish yours was the answer as I would mark it as so :P, i didnt realize it was the group section at the bottom of the report so i was all kinda of lost. – Tony Dec 11 '13 at 18:42
  • 8
    KeepWithGroup=After was key for me. Like too many Microsoft things, this is a non-obvious trick needed to get a feature working. Thank you! – leqid Jan 15 '14 at 22:30
  • 1
    I am trying to export the report in PDF or excel. This is working fine for PDF. i.e, it is inserting row headers on every page. But for Excel I want to freeze the headers when I scroll. Is it possible..? – AnandhaSundari M Apr 10 '15 at 11:44
  • My left-most column is a grouping. So when I click through the list of Static column groups, it never selects the left-most one. So I can't set it to RepeatOnNewPage=true and KeepWithGroup=After. Ideas on how to do this, when your left-most column is a grouped column? – awright May 15 '15 at 18:28
  • If your column headers have more than one row, you need to apply step 3 on each row. I.e. click each "static" item above the "Details" item and apply step 3. – Ricky Apr 18 '18 at 11:45
  • The other "trick" I found was that the "Tablix Member" properties weren't showing. I thought it was because I was clicking wrong, but had to to to menu, View, then click "Properties". – NealWalters Aug 27 '19 at 15:14
20

I have 2.0 and found the above to help; however, the selecting of a static did not highlight the cell for some reason. I followed these steps:

  1. Under column groups select the advanced and the statics will show up
  2. Click on the static which shows up in the row groups
  3. Set KeepWithGroup to After and RepeatOnNewPage to true

Now your column headers should repeat on each page.

parkerw262
  • 316
  • 2
  • 4
11

How I fixed this issue was I manually changed the code behind (from the menu View/code). The section below should have as many number of pairs <TablixMember> </TablixMember> as the number of rows are in the tablix. In my case I had more pairs <TablixMember> </TablixMember>than the number of rows in the tablix. Also if you go to "Advanced mode" (to the right of "Column Groups") the number of static lines behind the "Row groups" should be equal to the number of rows in the tablix. The way to make it equal is changing the code.

<TablixRowHierarchy>
      <TablixMembers>
        <TablixMember>
          <KeepWithGroup>After</KeepWithGroup>
          <RepeatOnNewPage>true</RepeatOnNewPage>
        </TablixMember>
        <TablixMember>
          <Group Name="Detail" />
        </TablixMember>
      </TablixMembers>
    </TablixRowHierarchy>
user3508487
  • 111
  • 1
  • 2
  • To my surprise, doing this resolved the problem. I had a tablix w/ 6 rows (3 header rows plus a group w/ a header, detail, and footer row). Looking at the source showed 6 s but 7 s in the . I took my best guess as to which was the extra (one that wrapped the group) and removed it. This version failed to render, but the error message indicated that a row needed to have its and settings changed to match the previous ones; I changed those to "true" and "After" in the 3rd (Static) row and voila! I wish I actually understood ;)! – GISmatters Oct 04 '16 at 12:33
  • Thanks for this. I've been using SSRS for over 10 years now and just ran into this issue - indeed, there was an extra wrapper of TablixMember around the group (no doubt from experiments with adding and removing groups). Cleaning up the member list solved the mysterious non-repeating header. – Carl Daniel Jan 26 '17 at 21:23
  • Thanks I had to delete two excess TablixMember rows that were grouped and had no data. The sign of this for me in my report was that there were two static row groups instead of one. Once I removed the excess XML nesting the repeating rows started working. – Noppadet Apr 05 '18 at 23:33
  • 1
    Thank you. Only this solution worked for my report where I was facing the similar problem. – Syed Aug 14 '18 at 00:47
  • apparently the proper setting is missing in Visual Studio. So the „advanced settings“ tipps that refer to ReportBuilder didn't help. Manual editing of the file worked like a charm. Thanks! – MovGP0 Jun 11 '19 at 11:29
11

Open Advanced Mode in the Groupings pane. (Click the arrow to the right of the Column Groups and select Advanced Mode.)

In the Row Groups area (not Column Groups), click on a Static group, which highlights the corresponding textbox in the tablix.

Click through each Static group until it highlights the leftmost column header. This is generally the first Static group listed.

In the properties grid:

  • set KeepWithGroup to After
  • set RepeatOnNewPage to True for repeating headers
  • set FixedData to True for keeping headers visible
Arulkumar
  • 12,153
  • 12
  • 44
  • 61
Elmer
  • 129
  • 1
  • 4
5

Another way to accomplish this if you still have that issue is by doing the following :

  • Clear all the Table header text leave it empty.
  • On the Reports “Header” section add textboxes inside a rectangle , each textbox will represent a column header for the table.
  • As this rectangle is on the Reports Header section it will display on all report pages.

Thanks, Sufian.

Sufian O
  • 141
  • 2
2

What worked for me was to create a new report from scratch.

This done and the new report working, I will compare the 2 .rdl files in Visual Studio. These are in XML format and I am hoping a quick WindDiff or something would reveal what the issue was.

An initial look shows there are 700 lines of code or a bit more difference between both files, with the larger of the 2 being the faulty file. A cursory look at the TablixHeader tags didn't reveal anything obvious.

But in my case it was a corrupted .rdl file. This was originally copied from a working report so in the process of removing what wasn't re-used, this could have corrupted it. However, other reports where this same process was done, the headers could repeat when the correct settings were made in Properties.

Hope this helps. If you've got a complex report, this isn't the quick fix but it works.

Perhaps comparing known good XML files to faulty ones on your end would make a good forum post. I'll be trying that on my end.

user1585204
  • 665
  • 6
  • 11