Skip to main content

Create a Report with Cross-Band Content and Populated Empty Space

  • 5 minutes to read

This tutorial describes how to create a report similar to the Cross-Band Content demo that includes the following layout options:

  • Print part of the content across bands (the blue panel).
  • Populate the empty space between the detail and footer information with blank rows.

You can view the online demo or view the desktop demo (requires the DevExpress Demo Center to be installed).


Bind to Data

  1. Add a new blank report to your application.

  2. Bind the report to the OrderDetailsExtended view from the sample Northwind database. Join the following tables/views:

    • The OrderDetailsExtended view to the Orders table by the OrderID field.
    • The Orders table to the Customers table by the CustomerID field.
  3. Set the report’s DataMember to OrderDetailsExtended.


Add a Data Table

  1. Expand the OrderDetailsExtended query in the Field List and select the ProductName, UnitPrice, Quantity, and ExtendedPrice fields. Hold CTRL or SHIFT and click the fields to select multiple fields and drop them onto the Detail band.


    This creates an XRTable with each cell bound to a data field.

  2. Add line numbers. Right-click the ProductName cell and select Insert | Column to Left from the context menu.


  3. Select the new cell and specify the following property values:

    • Summary: Report
    • Expression: sumRecordNumber([ProductName])


  4. Format the currency data. Click the UnitPrice cell’s smart tag and set Format String to {0:$0.00}. Set the ExtendedPrice cell’s format string to the same value.


The resulting report lists all items from all invoices.


Group Data

Group table data by Order ID to produce invoices.

  1. Right-click the design surface. Select Insert Band / GroupHeader from the context menu.


  2. Click the GroupFields property’s ellipsis button in the GroupHeader‘s smart tag to invoke the Group Field Collection Editor.


  3. Click the Add button to add a group field. Expand the FieldName property’s drop down and select OrderID from the list.


  4. Correct the line numbers, as the records are now arranged in groups. Select the cell that displays line numbers and change the Summary property to Group.


The GroupHeader band is printed for each group. Use it to add a heading that includes column titles, an invoice ID, and a date.

  1. Switch to the Field List and select the fields for which you want to create column titles. Drag the selected fields onto the GroupHeader band with the right mouse button.


  2. Switch to the Field List, select the OrderID field, and drop it onto the band. Do the same with the OrderDate field.


  3. Add captions to the Order ID and OrderDate fields:

    • Click the OrderID label’s smart tag and set its Format String property to Order ID: {0}.

    • Click the OrderDate label’s smart tag and set its Format String to Order Date: {0:dddd, MMMM d, yyyy}.


The records are now grouped by orders.


Add Totals

Add a footer to display totals and other summary data on invoices.

  1. Right-click the design surface. Select Insert Band / GroupFooter from the context menu.


  2. Drop an XRTable from the Toolbox. Configure the table’s cells to display the following totals:


    Format String



    Sub Total:



    sumSum([Quantity] * [UnitPrice])




    sumSum([UnitPrice] * [Discount] * [Quantity])

    Grand Total:





  3. Place each invoice on a separate page. Click the GroupFooter‘s smart tag and set the PageBreak property to AfterBand.


  4. Align the invoice totals to the bottom of the page. Click the GroupFooter‘s smart tag and check the PrintAtBottom property.


Each invoice is now placed on a separate page and the invoice totals are printed at the page bottom.


Populate the Empty Space

Add empty lines to invoices to populate the empty space between the Detail band’s data and the totals.

Click the Detail band’s smart tag and check the FillEmptySpace property.


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. Their Text property values are displayed instead.


Click each cell’s smart tag and clear the Text property to display empty lines.



Add Cross-Band Data

Add a panel with recipient details across the entire invoice. Place the panel on a separate GroupHeader band that is printed in the background of other bands.

  1. Add another GroupHeader band to the top of the report. Click the added band’s smart tag and set the PrintAcrossBands property. This makes the band content start at the top of the GroupHeader1 and end at the bottom of the GroupFooter1 band.



    Choose PageHeaderBand instead of the GroupHeader band to limit the cross-band content to a page, even if the GroupFooter is on the next page.

  2. As the new GroupHeader band is above the invoice header, it is not grouped by orders. To include it in the grouping, remove the OrderID group field from the GroupHeader1 band, and add it to GroupHeader2.

  3. Add an XRPanel control to the GroupHeader. Specify the panel’s BackColor property and drop fields onto the panel.


  4. Adjust the panel’s width and height. The height should match the page height, as the GroupFooter is printed at the bottom of the page.


  5. Switch to Print Preview. The panel is printed on the background of the group content.


  6. Adjust the content in other bands to print it side-by-side with the panel.


See the final report in Print Preview.



Tutorials that explain how to create different reports using Web Report Designer are included in the End-User Documentation online help section.