Share via


Working with Group Features (Reporting Services)

After you define a group for a data region, you can set group properties. These group properties refine the data in the group and help control how group data displays on a report page. In a table, matrix, or list, you can set page breaks based on groups and you can control the initial visibility of groups to hide complexity or provide emphasis. You can provide navigation to display a report that starts with a specific group or a specific value in a group. In a chart, you can set the sort order for a group, which indirectly controls the color mapping for group values from the chart palette.

Adding Page Breaks

Where you can add page breaks depends on the type of data region that you are using:

  • In a table, matrix, or list data region, group properties enable you to control whether to start each group on a new page. Setting page breaks on a group helps manage report rendering performance because the page breaks control the amount of data on each page. You can set page breaks before or after group instances, or between group instances.

  • In a Chart data region, you can set page breaks on the chart itself.

  • In a Gauge data region, you can set page breaks on the gauge panel.

For more information, see Adding Page Headers and Footers, Understanding Pagination in Reporting Services, and How to: Add a Page Break (Reporting Services).

Displaying Group Headers with Their Groups

When you add a row or column to a table, matrix, or list, you can specify whether to add the row or column inside or outside a group. A row or column that is outside a group can serve as a group header or group footer, depending on where you position the row or column. When the data region renders in the report, you can set properties that help keep the row or column with the group. For more information, see How to: Display Headers and Footers with a Group (Reporting Services).

Displaying Row or Column Headings on Multiple Pages

When you scroll through a report, you can set properties to control how row and column headings display for a table, matrix, or list data region. You can set properties to keep row headers visible when you scroll vertically and column headers visible when you scroll horizontally. You can also repeat row and column headers on each page. For more information, see How to: Display Row and Column Headers on Multiple Pages (Reporting Services).

Adding Navigation

To provide a report outline that enables a user to locate specific group values that the report generates at run time, use the document map feature. A document map enables a user to click a link and view the starting page for the group or a unique value of a group. You can also add bookmarks and create your own internal hyperlinks to each unique value in a group. For more information, see Adding Links to a Report, Adding a Document Map, and How to: Add a Bookmark to a Report (Reporting Services).

Adding Conditional Visibility

In a table, matrix, or list, you can control the initial visibility of rows or columns that are associated with groups. By setting the appropriate properties, you can control the initial visibility in the following ways:

  • Provide drilldown functionality that enables a user to show or hide group levels that are organized in a visual hierarchy.

  • Provide conditional visibility by defining an expression for the Hidden property of a group. For example, write an expression that bases the value on a Boolean report parameter. Then, a user can click a radio button for the parameter to toggle the visibility of a group on the page.

For more information, see Hiding Report Items Conditionally and How to: Add a Visibility Toggle to an Item (Reporting Services).

Defining Filter Expressions

To refine the data in a group, create a filter expression. The report applies group filters after the report applies filters for the report dataset, the data region, and filters for parent groups. For more information, see Filtering Data in a Report and How to: Add a Filter (Reporting Services). To understand more about parent groups in a group hierarchy, see Understanding Groups (Reporting Services).

Defining Sort Expressions

The type of sort expressions that you can use depends on the type of data region:

  • By default, when you create a group in a table, matrix, or list, the sort expression is set to the group expression. This controls the order in which group values appear on a page. In addition, you can add interactive sort buttons to a text box to enable the user to control the sort order for groups in the rendered report.

  • In a chart, you can set the sort expression on the chart. This indirectly controls the order of colors that the report uses to display category and series data. For more information, see How to: Define Colors on a Chart Using a Palette.

For more information about sorting, see Sorting Data in a Report and How to: Sort Data in a Data Region (Reporting Services).

Defining Group Variables

When you define a group, you can create a variable that is scoped to the group and can be accessed from child groups. For example, you can define a group variable that calculates the tax for a specific region, and then use that value to calculate tax amounts within a group. For more information, see Using Report and Group Variables Collection References in Expressions (Reporting Services).

Defining the Same Group Expression for Multiple Data Regions

By using the same group expressions in a table or matrix and a chart, you can provide multiple views of the same dataset. For example, you can display the same data as a table to see all quantities and as a pie chart to visualize each quantity in relation to the whole. For more information, see Linking Multiple Data Regions to the Same Dataset.

You can nest a data region in a cell in a table, matrix, or list. However, if you nest a data region in this manner, the scope of the nested data region is the innermost row and column groups to which the cell belongs. For example, you add a chart to a cell that is in both a row group and a column group. The data available to that chart is scoped to the row group instance and column group instance at run time. For more information, see Nesting Data Regions.