Adding page breaks in SSRS (SQL Server Reporting Services) reports is a common requirement that helps organize report content logically or based on specific needs for improved readability and printing. Below are the steps and examples for adding page breaks in SSRS reports:
Step 1: Open the Report Designer
First, open your report project in the SSRS Report Designer. For new projects, set up the data source and dataset first.
Step 2: Locate the Position for Adding Page Breaks
Based on report requirements, determine where to add page breaks, such as at the end of each group, after specific report items, or between subreports.
Step 3: Add or Modify Group Properties
If you need a page break at the end of each data group:
- In the 'Report Data' pane, locate your group (e.g., a group based on 'Department').
- Right-click the group name and select 'Group Properties'.
- Go to the 'Header and Footer' tab, under the 'Page Breaks' section,
- Check 'Add page break at the end of each group'.
- If needed, check 'Add page break at the start of each group' for breaks before the group.
Step 4: Set Report Item Page Break Properties
If you need a page break after a specific report item:
- Select the report item (e.g., a table, list, or matrix).
- In the 'Properties' pane, find the 'PageBreak' property.
- Set the 'BreakLocation' property to 'End' (for a break at the item's end) or 'Start' (for a break at the item's beginning).
- Adjust other relevant properties, such as 'Disabled', to enable or disable the page break based on conditions.
Example
Suppose you are creating a sales report and need a page break at the end of each sales region to display each region's data on a separate page. Follow these steps:
- Add a group based on 'Sales Region' in the report's dataset.
- In the group's 'Group Properties', enable 'Add page break at the end of each group'.
- Preview the report to confirm each sales region's data starts on a new page.
With this configuration, readers can easily review regional sales data, and printing ensures no data is truncated across pages.