### Creating a banded report

When creating a banded report, you can choose in which layout the banded object in the report will be, that is, you can choose whether to create a standard banded report, a horizontal banded report or a mailing label report, according to your requirements.

The steps for creating a standard banded report, horizontal banded report and mailing label report are mostly the same, just that the banded object is positioned differently in each report layout: one in a vertical way, one horizontally and one in the form of mailing labels.

Assume that you have already opened a page report, to create a standard banded/horizontal banded/mailing label report within it:

1. Do either of the following:
   - Click File > New > Page Report Tab on the menu bar.
   - On the report tab bar, right-click an existing report tab in the report and click Insert on the shortcut menu.
2. In the New Page Report Tab dialog, specify the title of the report tab, select the Banded/Horizontal Banded/Mailing Label layout and click OK. The corresponding report wizard appears.
3. In the Data screen of the wizard, specify the dataset on which the banded object will be built.
   - To build the banded object on a new dataset created from the catalog resources, check the New radio button, and then select the data source of the dataset. If the given data resources are not what you want, click the <Add xxx...> item to create one. In addition, if you choose to create the dataset from a query, you can click the Modify button to further modify the query if required.
   - To build the banded object on an existing dataset in the report, check the Existing radio button, and then select the dataset as required (click the Modify button to modify the selected dataset in the Dataset Editor if necessary). You can also click the <Add Dataset...> item to create one as required.
4. In the Display screen, add the required fields from the Resources box to be displayed in the banded object. Modify the display name of any added field if necessary by double-clicking its Display Name cell. And if required, click the Sort Fields By button to specify how to sort data in the banded object (for details, refer to the same topic on table).
5. In the Group screen, add the fields as the grouping criteria, and then specify the sorting direction of each group in the Sort column (for details, see the same topic on table).
6. To add summaries, go to the Summary screen. In the sum on box (the box on the right), specify the group to which the summary will be applied (if you select Banded Object, the summary will be based on the whole dataset), add a field from the Resources box as the summary field, and then select the function for the summary from the Aggregate Function column.
7. If you want to create a chart together with the banded object in the banded header panel, go to the Chart screen. Select the chart type you like. From the Category drop-down list, select the field you want to display on the category (X) axis of the chart. You can choose from the group by fields of the banded object on which some summaries are added. Choose the field to be displayed on the series (Z) axis of the chart from the Series drop-down list, where all the group by fields of the banded object are listed. From the Show Values drop-down list, select the field you want to display on the value (Y) axis of the chart. You can choose from the summary fields which are calculated based on the field you specify to display on the category axis of the chart.
8. To apply some filters to the banded object so as to reduce the data displayed in the banded object, go to the Filter screen and define the filter conditions.
9. If you are creating a mailing label report, in the Layout screen, specify the label size and the gap between the labels.
10. In the Style screen, specify the title and style of the banded object, and if required, click the Page Setup button to set the page settings.
    - Create a Banded Report
      Creates a restricted version of a flow layout report tab, one that can contain a single banded object only. This layout option is intended to provide compatibility with JReport Version 7 report templates.
    - Create a Flow Layout Report Containing a Banded Object
      Creates a report tab that contains a banded object mapped to the specified dataset. This layout option is specified by default.
11. When done, click Finish to create the report tab.

Notes:

- When you want to create a banded report on a hierarchical data source, pay attention to the unique features of HDS. For details, refer to Developing reports from HDS.
- If you have added several group by fields to the banded object in the Group screen, when the report is created, these groups will be indented according to the Customize group indent option setting in the Options dialog. You can configure this option in advance to have the groups indented according to your requirements.
- If you have added some summaries to the banded object in the Summary screen, when the report is created,
  - JReport will automatically give the summaries some proper name labels to help you clarify the meaning of the numbers. The auto generated labels are controlled by the Text property in the Report Inspector. You can also manually edit the text of the label later by setting this property.
  - By default, the summaries that have the same function will be aligned horizontally in the banded object. If you want to align summaries of the same function vertically, check the option "Align summaries vertically" in the Component category of the Options dialog in advance.

See also:

- Banded Wizard for detailed explanation about options in this wizard.
- Horizontal Banded Wizard for detailed explanation about options in this wizard.
- Mailing Label Wizard for detailed explanation about options in this wizard.
- Banded objects for details about the banded object component.
- An example: The SampleComponents catalog, included with JReport Designer, contains reports that have examples of report layout types. For the banded report layout example, open `<install_root>\Demo\Reports\SampleComponents\BandedObjectReport.cls`.