Help & Support
Contents
Display Legacy Contents

Search:

Home > Report Designer > Getting Started > Report Bands

Report Bands

Home > Report Designer > Getting Started > Report Bands

Report Bands

This document introduces the band types currently available in XtraReports; describes what they can be used for; and how to add, edit or delete bands for a particular report. To learn more on the basic principles of creating a report, refer to Report Creation Basics .

Every report in XtraReports is a banded report. This means that a typical report consists of a number of bands, each of a different type. Every band may contain Report Control.


What is a Band?

A Report Band represents a specific area on a report page, used to define how to render report controls that belong to it. Every band is an instance of the Bandclass descendant. This class provides the Band.HeightF  property that specifies the space that a band occupies on a page, along with other specific properties which define a band's behavior.

In the report designer  report bands are represented by the parts of the design surface, divided with band strips.


Band Types

When a new blank report is added to a project it looks as shown in the image below by default. As you can see, the report's area is initially divided into three basic bands (PageHeader, Detail and PageFooter bands) that provide space for placing different report controls on them.

A particular band type specifies how the controls located on this band are rendered, their rendering order and how many times they are rendered. Note that in the report designer, some of the band strips may display tips with information on how bands will be rendered. For instance, for the PageHeader and PageFooter bands, the "one band per page" tip is displayed.

Later on, when creating a particular report, you can add or remove these or any other bands. There are different band types available in XtraReports, and each individual band is a descendant of the Band class. The table below lists them.

 Band Description 

Top Margin band

Located on the top margin of every page, above the Page Header Band or Report Header Band.

Report header band

Located at the beginning of a report. This band is intended to display some introductory information, e.g. a cover page for a report.

Page Header band

Located at the top of every page, below the Top Margin Band or report header Band. This band is intended to display page numbers or a table header, continued from the previous page.

Group Header Band          

Located at the beginning of every group or at the top of the page in case it is split across pages. This band specifies grouping criteria and is used to display information at the beginning of a group of records. For more information, refer to Grouping Data .

Details Band

Located on a page between all other bands. This band displays a single record (from the bound datasource) at a time, or simply holds unbound controls if there is no datasource assigned to a report.

Details report Band

Located below the Details band and is intended to hold the detail report when creating a master-detail report. The master-detail relationship for this detail report is specified by the DataMember property. To learn more about detail reports, refer to Master-Detail Report .

Group Footer Band

Located at the end of every group or at the bottom of the page if its group is split across pages. This band is primarily intended to show summary information for a group.

Report Footer Band

Located at the end of a report. This band is intended to display some final information, e.g. report totals.

Page Footer band

Located at the bottom of every page, below the Report Footer Band and above the Bottom Margin Band. This band is intended to display page numbers or a table footer, which has been continued on the following page.

Bottom Margin band

Located at the bottom margin of every page, below the Page Footer Band.





The following image illustrates the relative positions of different band types, and how many times they are rendered in a report.

The Page Header, Page Footer, Top Margin and Bottom Margin bands are rendered in the report preview on every page.

The Report Header and Report Footer bands are rendered in the report preview only once.

The Group Header and Group Footer bands are rendered for every group of records in a report.

The number of times the Detail band is rendered in a report depends upon the number of records returned from the bound datasource - one band per record.


Editing Bands

Bands of a specific report are contained in the Band Collection instance, accessible by the report's band property. This collection and its items can be modified in different ways.

  • Design time

    Select a report, open the Properties pane and click the ellipsis button for the Band property. This will invoke the Report Editor dialog, which displays a hierarchical tree of report bands, and is intended for adding or removing bands, as well as editing their public properties.

  • Design time

    Another way to invoke the Report Editor dialog is to choose the Edit and Reorder Bands... option in a report's smart tag . Note that this smart tag is shown in the top left corner of the report designer, when a report gets focus at design time.

    And the same option is available via each band's smart tag as well.

  • Design time

    If you want to simply add a new band of a particular type, you may use the report's context menu for this. Right-click a report's area at deign time, as shown in the image below, and you'll be able to insert new bands into the report.



See also



Properties
Article ID:
report_bands2
Views: 193
Created By: jimdurkin
Modified By: [Modified By]
Created Date: 3/24/2014 12:31 PM
Last Modified: 3/24/2014 12:31 PM
Actions
Print This Article
Bookmark
Email This Article
Previous Article
Next Article