All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DetailBand.FillEmptySpace Property

Gets or sets whether to populate the empty space between the DetailBand and the next band/the end of the page.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.1.dll

Declaration

[SRCategory(ReportStringId.CatBehavior)]
[DefaultValue(false)]
public bool FillEmptySpace { get; set; }
<SRCategory(ReportStringId.CatBehavior)>
<DefaultValue(False)>
Public Property FillEmptySpace As Boolean

Property Value

Type Default Description
Boolean

false

true, to populate the empty space between the DetailBand and the next band/the end of the page; otherwise, false.

Remarks

When the FillEmptySpace property is enabled, the empty region below the Detail band is populated with copies of the band. The band retains its layout, but report controls are printed without data.

The following images illustrate when the FillEmptySpace property takes effect. There must be a gap on the page between a DetailBand and content that follows.

You can display static text in the band's copies. To do this, specify the Text property of the controls in the Detail band.

text

If the Detail band includes line numbers, they are also added to the band's copies.

sumrecordnumber

TIP

The Create a Report with Cross-Band Content and Populated Empty Space topic describes how to create a report with a populated empty space.

Handle the XtraReport.FillEmptySpace event to populate a report's empty space with custom content.

Runtime Example

The code sample below illustrates how to populate the empty space between the DetailBand and the bottom of the page. The report is bound to the Categories table from the sample Northwind database included in the XtraReports installation.

detailband-fillemptyspace-sample-preview

using System.Drawing;
using System.Drawing.Printing;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting;
// ...
public static XtraReport CreateReport() {
    // Create an XtraReport instance.
    XtraReport report = new XtraReport();

    // Create the DetailBand and add it to the report.
    DetailBand detailBand = new DetailBand() {
        HeightF = 20,
        FillEmptySpace = true,
    };
    report.Bands.Add(detailBand);

    // Create a control for the category name and configure its expression bindings.
    XRLabel lbCategoryName = new XRLabel() {
        Text = "---",
        BoundsF = new RectangleF(50, 0, 500, 25),
    };
    lbCategoryName.ExpressionBindings.Add(new ExpressionBinding("Text", "[CategoryName]"));

    // Add the control to the band.
    detailBand.Controls.Add(lbCategoryName);

    // Return the resulting report.
    return report;
}
See Also