Back to Devexpress

SubBand Class

xtrareports-devexpress-dot-xtrareports-dot-ui-e8342347.md

latest3.4 KB
Original Source

SubBand Class

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

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
public class SubBand :
    Band
vb
Public Class SubBand
    Inherits 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:

csharp
Report.Bands[BandKind.ReportHeader].SubBands.Add(new SubBand());
vb
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 :

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:

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

Implements

IScriptable

Inheritance

Object MarshalByRefObject Component XRControl Band SubBand

See Also

SubBand Members

SubBandCollection

Introduction to Banded Reports

DevExpress.XtraReports.UI Namespace