Tablix header not repeating on new page, when subreport causes page break

A very clean and simple way to repeat the column header on each page

http://www.a2zmenu.com/Blogs/BI/Tablix-headers-not-repeating-in-SSRS-2008.aspx


We've solved our problem... although not in the most ideal way.

The Page Header (of the "master" report, not the subreports) seems to be the only way to consistently have a header section.

We implemented a solution based in large part on this blog posting: Maintaining State in Reporting Services 2008

We modified slightly from the blog post, removing "id" from the methods and including a GUID to ensure the report values are not mixed up even if the user runs several copies of the report at the same time. (When using shared variables, remember that they are global to the report running across execution instances and across users on the report server, so a lot of care needs to be taken when they are used!)

In the report body we have a hidden text block that calls:

=Code.SetValue("xxx",Fields!Field1.Value) & Code.SetValue("yyy",Fields!Field2.Value)

and in the report page header we reference these as (for example):

=Code.GetValue("xxx")

This works because the body is calculated before the page header, even for Page 1.

Still, in the end it is a hack for something that should be in Microsoft's product, given that they have poured years of development into this product! Why we cannot have nested tablix's and easier to use headers is beyond me... again this is upgrading a report from a program from the early 90's which did all this without problem. At the very least, give us report variables that can be retrieved and set as the report is processed!

Regardless, things are as they are... we've tested the solution with shared variables and it seems to be working very well. We're going to run stress tests to make sure it's implemented correctly, I'll post something here if we find any further problems.

(And if anyone knows of some other way to get consistent header rows on pages, even when there are detail rows with large heights, please share...)