Repeating Row Headers - SSRS 2010

Overview

Getting row headers to repeat on every page in RDLC 2010 (i.e., the version of the Report Designer that ships with Visual Studio 2010) is not a straightforward as it ought to be, and has a pitfall. This article details how to get it to work.

Noteworthy Pitfall

Taken from http://support.k2techno.com.au/?W788

If you add a grouping and then remove it without removing the related rows, Visual Studio leaves behind unused (Static) rows, which can play havoc with your repeating.

Image

You will get errors like The grouping 'Group1' has an invalid TablixMember. A TablixMember that is dynamic (i.e., has a Group specified) or has dynamic descendants must have the KeepWithGroup property set to "None". It appears the only way to fix this is to edit the XML directly. Below in bold is the additional level that was inserted but not correctly removed. If you remove these four lines (two sets of two lines each), this should fix the problem.

 
<TablixRowHierarchy>
  <TablixMembers>
    <TablixMember>
      <KeepWithGroup>After</KeepWithGroup>
      <RepeatOnNewPage>true</RepeatOnNewPage>
      <KeepTogether>true</KeepTogether>
    </TablixMember>
    <TablixMember>
      <Group Name="HubGroup">
        <GroupExpressions>
          <GroupExpression>=Fields!Hub.Value</GroupExpression>
        </GroupExpressions>
      </Group>
      <SortExpressions>
        <SortExpression>
          <Value>=Fields!Hub.Value</Value>
        </SortExpression>
      </SortExpressions>
      <TablixMembers>
        <TablixMember>
          <KeepWithGroup>After</KeepWithGroup>
          <RepeatOnNewPage>true</RepeatOnNewPage>
          <KeepTogether>true</KeepTogether>
        </TablixMember>
        <TablixMember>
          <TablixMembers>
            <TablixMember> 
              <Group Name="ProjectGroup">
                <GroupExpressions>
                  <GroupExpression>=Fields!Project_Description.Value</GroupExpression>
                </GroupExpressions>
              </Group>
              <SortExpressions>
                <SortExpression>
                  <Value>=Fields!Sort_Order.Value</Value>
                </SortExpression>
                <SortExpression>
                  <Value>=Fields!Project_Description.Value</Value>
                </SortExpression>
              </SortExpressions>
              <TablixMembers>
                <TablixMember>
                  <KeepWithGroup>After</KeepWithGroup>
                  <RepeatOnNewPage>true</RepeatOnNewPage>
                  <KeepTogether>true</KeepTogether>
                </TablixMember>
                <TablixMember>
                  <Group Name="Details" />
                  <SortExpressions>
                    <SortExpression>
                      <Value>=Fields!Project_Phase.Value</Value>
                    </SortExpression>
                  </SortExpressions>
                </TablixMember>
              </TablixMembers>
            </TablixMember>
          </TablixMembers> 
          <KeepWithGroup>After</KeepWithGroup>
          <RepeatOnNewPage>true</RepeatOnNewPage>
          <KeepTogether>true</KeepTogether>
        </TablixMember>
      </TablixMembers>
    </TablixMember>
  </TablixMembers>
</TablixRowHierarchy>

Walk-Through

1. In the grouping pane, switch to Advanced Mode (via the triangle in the upper right corner), then select the first (Static) row group.

Row Groups

Row Groups


2. In the Properties pane, set the following properties.


Row Groups

Row Groups