Skip to main content

SubBand Class

A report band that is a copy of the source band located above it.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public class SubBand :
    Band

Remarks

Use sub-bands to create multiple band versions within a single report and choose the appropriate version to display based on a specific condition. For an example of use, review the following help topic: Use Sub-bands to Show a Report Band Conditionally.

Create a Sub-band in Code

Use the SubBands property to access the SubBandCollection that belongs to a report Band. The following code adds a new sub-band to the Report Header band:

Report.Bands[BandKind.ReportHeader].SubBands.Add(new SubBand());

Create a Sub-band in Report Designer

Right-click the selected band to invoke the context menu, and select Insert Sub-Band:

Report Designer SubBand Context Menu

A band can have an unlimited number of sub-bands. You can add a sub-band to all types of bands except MarginBand and the SubBand itself.

A sub-band is a functional copy of the source band:

Report Designer Sub-band Variety

For more information on report bands, review the following help topic: Introduction to Banded Reports.

Implements

See Also