woensdag 16 oktober 2013

Crystal Reports vs. SS RS / Report Builder: Repeating Column Headers on Each Page

Crystal Reports
In Crystal Reports, this is very simple. When you put a number of fields in the detail section of your reports, it will automatically put the field names in the page header. The page header will be repeated on every page and the problem is solved.

In case of a group, you can simply check the option Repeat Group Header On Each Page:

Report Builder / Reporting Services
In Report Builder / Reporting Services it is all a bit complicated. In a table, for example, you do not have column groups, so Report Builder does not recognize which textboxes are the column headers and checking Repeat header columns on each page doesn't work.

A known bug for which we need a work around. Instead, we need to open Advanced Mode in the Groupings pane:

We'll get:

  • Clicking on a Static group highlights the corresponding textbox in the tablix.
  • For the column headers that you want to repeat, select the Static group that highlights the leftmost column header.

This is generally the first Static group listed. 
  • In the Properties window, set the RepeatOnNewPage property to True.
  • 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, 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, Report Builder decides where to put the static member.

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

Geen opmerkingen: