### 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 report set, to create a standard banded/horizontal banded/mailing label report within it:

1. Do either of the following to open the New Report dialog.
   - Click File > New > Report on the menu bar.
   - On the report tab bar, right-click the tab of an existing report in the report set and click Insert on the shortcut menu.
2. In the dialog, specify the title of the report, select the Standard Banded Report/Horizontal Banded Report/Mailing Label Report layout and click OK. The corresponding report wizard will then be displayed.
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 according to your requirements.
   - To build the banded object on an existing dataset in the report set, check the Existing radio button, and then select the dataset as required (click the Modify button to modify the selected dataset if necessary). You can also click the <Add Dataset...> item to create one as required.

   Notes:

   - After choosing the dataset, you can click Finish directly in the report wizard to create a report with a blank banded object in it. After which, you can drag the required data fields, which are contained in the created/specified dataset, from the Resource View panel to the report.
   - If you want to create the banded object on an HDS, pay attention to the unique features of HDS. For details, refer to Developing reports from HDS.
4. In the Display screen, add the required fields from the Resources panel 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 panel (the panel 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 panel as the summary field, and then select the function for the summary from the Aggregate Function column.

   Notes:

   - The Break Field is a defined field on which the summary will be calculated (if the break field of a summary field is null, the summary will be calculated based on the whole dataset).
   - 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 manually input the text of the label according to your requirements.
   - If you have created several summaries in the banded report and the summaries have the same function, by default they will be aligned horizontally in the report, However, you can choose to align them vertically by checking Align summaries vertically in the Options dialog (File > Options > Component > Align summaries vertically).
7. In the Filter screen, define some filter condition(s) to filter the data displayed in the banded object.

   To define a filter condition, click the Add Condition button to add a condition line, then from the field drop-down list, select the field on which the filter will be based, set the operator with which to compose the filter expression from the operator drop-down list, and in the value combo box, type the value of how to filter the field or select the value from the drop-down list.

8. If you are creating a mailing label report, in the Layout screen, specify the label size and the gap between the labels.
9. 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, 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 that contains a banded object mapped to the specified dataset. This layout option is specified by default.
10. When done, click Finish to create the report.

See also:

- Standard Banded Report Wizard for detailed explanation about options in this wizard.
- Horizontal Banded Report Wizard for detailed explanation about options in this wizard.
- Mailing Label Report Wizard for detailed explanation about options in this wizard.
- Banded objects for details about the banded object component.

See 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`.