Reputation: 3835
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 (I'm using v3.0). Is this true? If not, is there something else that needs to be done?
Upvotes: 191
Views: 220034
Reputation: 131
I have fixed this issue by manually changing the Tablix markup/code behind (from the menu view/code).
The section below should have as many number of pairs of <TablixMember> </TablixMember>
as the number of rows there 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" at the bottom of Report Builder) 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>
Upvotes: 13
Reputation: 7218
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:
RepeatOnNewPage
property to True:(If you don't have the Properties window open, click the View tab at the top of Report Builder and check the box for Properties):
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.
Upvotes: 494
Reputation: 965
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.
If you've got a complex report, this isn't the quick fix but it works.
Upvotes: 2
Reputation: 141
Another way to accomplish this if you still have that issue is by doing the following:
Upvotes: 5
Reputation: 137
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:
KeepWithGroup
to After
RepeatOnNewPage
to True
for repeating headersFixedData
to True
for keeping headers visibleUpvotes: 10