[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Collapse]Reporting
 [Expand]Product Information
 [Expand]Get Started with DevExpress Reporting
 [Expand]Create Popular Reports
 [Collapse]Detailed Guide to DevExpress Reporting
   Introduction to Banded Reports
  [Expand]Provide Data to Reports
  [Expand]Use Report Controls
  [Expand]Shape Report Data
   Arrange Dynamic Report Contents
  [Expand]Customize Appearance
  [Expand]Add Navigation
  [Expand]Provide Interactivity
  [Expand]Add Extra Information
  [Expand]Merge Reports
  [Expand]Use Expressions
  [Expand]Store and Distribute Reports
  [Expand]Reporting API
 [Expand]Visual Studio Report Designer
 [Expand]Create End-User Reporting Applications
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Arrange Dynamic Report Contents

You can use Print Preview to see what the resulting document looks like because data-aware controls' contents are not available at design time. This document describes how to maintain report elements' correct location in a published document.

Expanded Maintain Page Breaks

Use the XRPageBreak control to insert a page break at the required location in a report.

You can use the Band.PageBreak property to add a page break before or after printing a specific band.

The following bands support this feature:

  • detail band
  • detail report band
  • report header and footer
  • group headers and footers

Expanded Maintain the Band Location on a Page

Use the GroupFooterBand.PrintAtBottom and ReportFooterBand.PrintAtBottom properties to choose whether group and report footers should appear at the bottom of a page or immediately after the previous band.

ReportFooterBand.PrintAtBottom = false ReportFooterBand.PrintAtBottom = true

Use the PageBand.PrintOn property to avoid printing page headers and footers on the same page with a report header and/or footer.

Use the GroupBand.RepeatEveryPage property to repeat group footers and headers on every page.

Expanded Keeping Content Together

You can choose whether a control's content can be split across several pages using its XRControl.KeepTogether property.

Enabling this property for a single control makes the same band's controls behave like this option is enabled.

Use the Band.KeepTogether property to enable this feature for all controls within a specific band.

Note

This feature is not available for the XRChart, XRSparkline and XRSubreport controls.

In a master-detail report, you can print the detail band on the same page as the detail report band using the DetailBand.KeepTogetherWithDetailReports property.

Expanded Maintain the Size and Content of Data-Bound Controls

Use the XRControl.CanGrow and XRControl.CanShrink properties to make a data-bound control automatically adjust its height to its contents.

CanGrow = false CanGrow = true
CanShrink = false CanShrink = true
Note

This feature does not work with anchoring enabled, as well as for labels that are used to display summary function results.

Use the XRLabel.AutoWidth property to make a data-bound XRLabel or XRCharacterComb automatically adjust its width to its content. This option behavior depends on the control's current horizontal alignment (the XRControl.TextAlignment property value).

The XRControl.WordWrap property allows you to make a control display its contents in multiple lines when it does not fit into the control's dimensions.

AutoWidth = false

WordWrap = false

AutoWidth = false

WordWrap = true

AutoWidth = true

WordWrap = false

AutoWidth = true

WordWrap = true

You can also use the opposite XRLabel.TextFitMode property to adjust an XRLabel or XRTable's font size to fit the control's bounds.

TextFitMode = None TextFitMode = GrowOnly TextFitMode = ShrinkOnly TextFitMode = ShrinkAndGrow

This property is not available in the following cases:

Expanded Anchoring Controls

You can anchor a control to the top, bottom, or both edges of its parent container using the XRControl.AnchorHorizontal and XRControl.AnchorVertical properties.

AnchorHorizontal = None AnchorHorizontal = Right AnchorHorizontal = Both

Expanded Suppressing Controls

Avoid Duplicated and Empty Values

When identical or null values appear in a report's data source, you can suppress these values in a report using the following properties:

These properties are available for the following controls:

Conditionally Suppress a Control

You can suppress a control when a specified logical condition is met by specifying the required XRControl.Visible property expressions as described in the Conditionally Suppress Controls topic.

In this case, a space remains in the band at the control's location. You can avoid this by placing these controls onto an XRPanel and setting its XRPanel.CanShrink property to true.

For this feature to work correctly, consider the following:

  • Specify the XRControl.Visible property's expression to the controls in the panel (and not to the panel itself).
  • Do not assign borders to the panel container. Otherwise, they are printed when the panel's content is suppressed.

Is this topic helpful?​​​​​​​