
Keeping Report Items Together on a Single Page
Many report items within a report can be kept together on a single page implicitly or explicitly by setting the keep with group or keep together properties. Report items are always rendered on the same page if the report item does not have any logical page breaks and is smaller in size than the usable page area. If a report item does not fit completely on the page on which it would usually start, a hard page break is inserted before the report item, forcing it to the next page. For soft page-break renderers, the page grows to accommodate the report item.
When the report item is always hidden, the rules for keeping items together are ignored.
The following items are always kept together:
-
Images.
-
Lines.
-
Charts, gauges, and maps.
-
A single row in a data region that appears separately on another page, by selecting the keep with group option. This will implicitly keep together the single row with at least one instance of the group so that the row is not orphaned. You can set this option on a data region or a group.
-
Header area of a data region.
-
Header area of a data region and the first row of data.
-
Report items that can be toggled in a Tablix data region.
Priority Order
Due to page size limitations, conflicts can arise between the rules for keeping report items together. When conflicts occur, the following priority order is used to keep items together when rendering:
-
Lines, charts, and images.
-
Widow and orphan control.
-
Repeated column headers and row headers.
Headers take precedence over footers. Inner repeated groups have priority over outer groups. Items where the RepeatWith property is set that are closer to the target data region have priority over items that are farther away from the data region.
-
Small report items, such as text boxes or rectangles, with an explicit KeepTogether property set to true.
-
Large report items, such as subreports or a non-innermost Tablix member, with an explicit KeepTogether property set to true.
-
Tablix data regions with an explicit KeepTogether property set to true.
Subreports
A subreport renders as a rectangle that contains another report that is defined in a separate report .rdl file. The subreport file must be published to a report server before it can be accessed by the parent report.
The following rules apply when rendering subreports:
-
Subreports can grow to the size of the body defined in the .rdl file that defines the subreport. For example, if the RDL for the subreport states that the subreport body is 5 inches wide, then the subreport will be 5 inches wide within the parent report.
-
Subreports inherit column settings from the parent report. Column settings that are defined in the original RDL are always ignored.
-
Only the body of the subreport is rendered. Header and footer sections that are defined in the subreport's .rdl file are not rendered when the subreport is rendered in the parent report.
-
Subreports have an explicit KeepTogether property. When it is set to true, all the items in the subreport are kept together on one page when possible.
-
If a subreport cannot run, it is displayed in the report as a text box with an error message. The style properties applied to the subreport are applied to the text box instead.
-
If the subreport is split by a page break, the Omit border on page break setting controls whether or not the borders on the subreport are closed or open.
For more information about subreports, see Adding Subreports.