Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

The following members return SubBand objects:

#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