Skip to main content
A newer version of this page is available. .

GroupHeaderBand.GroupUnion Property

Gets or sets a value indicating how a GroupHeaderBand and its group are split across pages.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

[DefaultValue(GroupUnion.None)]
[SRCategory(ReportStringId.CatBehavior)]
public GroupUnion GroupUnion { get; set; }

Property Value

Type Default Description
GroupUnion **None**

A GroupUnion enumeration value.

Available values:

Name Description
None

A group is printed so that it is split across several pages if there isn’t enough space on a page to print the entire group.

WholePage

A group is printed entirely on a single page (including its group header, rows and footer). This means that if there isn’t enough space on a page to print the entire group, this group is printed on the following page.

However, if the height of the entire group is more than the page height, this group is still split across several pages.

WithFirstDetail

A group is split across several pages “as is”. However, if there isn’t enough space on a page to print a Group Header together with the following group row, they both are moved to the next page, so that a Group Header is never printed on a page alone (with no group rows below it).

Remarks

The GroupUnion property is intended to specify whether group rows can be printed on different pages (in this case both GroupUnion and GroupFooterBand.GroupUnion are set to None), or the entire group will be printed on a single page (if the GroupUnion is set to GroupUnion.WholePage).

Also, if a group can be split across pages, but you don’t want a Group Header to be printed on a page if there is no data row below it (in case a group starts at the bottom of the page and there is enough room for only a Group Header), you may set the GroupUnion to GroupUnion.WithFirstDetail. In this case, if a Group Header is alone on a page, it will be moved to the beginning of the next page.

It is the same for the GroupFooter. If you don’t want it to be printed alone on a page, you may set its GroupFooterBand.GroupUnion to GroupFooterUnion.WithLastDetail, and the last group row from the previous page will be moved to the next page to be printed together with a Group Footer.

Note

You can set the GroupUnion property to GroupUnion.WholePage only if the GroupHeaderBand.GroupFields collection isn’t empty.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GroupUnion property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also