Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Repeating Row Headers - SSRS 2010

RSS
Modified on Wed, Jul 27, 2011, 10:43 AM by Administrator Categorized as SSRS (SQL Server Reporting Services)

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.

  • FixedData = True
  • KeepWithGroup = After
  • RepeatOnNewPage = True

Row Groups

Row Groups

  Name Size
- AdvancedMode.png 11.71 KB
- GroupProperties.png 8.58 KB
- RowGroupsExtraStatic.PNG 7.67 KB

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.