Previous Page Next Page
Inserting a Banded Object
Inserting a banded object based on a business view
Inserting a banded object based on a query resource
You can insert a banded object into a page report either with the wizard or by dragging and dropping. With the banded object wizard, it is easy to create banded objects, however, the wizard varies with the data resource type used to create the banded object: query resource or business view.
The data resource type a page report can use is determined at the time when the page report is created by the Create Using Business View option. Once defined, all the data components in the page report can only be created on the specified data resource type.
A banded object can be inserted in the report areas listed in Component placement.
Inserting a banded object based on a business view
- Position the mouse pointer at the destination where you want to insert the banded object. It can be in an empty area of the page report or inside another banded object.
- Click Insert > Banded Object or Home > Insert > Banded Object.
The Create Banded Object wizard appears.
- In the Data screen, select a business view on which to create the banded object.

- In the Display screen, add the group and detail objects to be displayed as detail fields in the banded object. To add a detail field, select an object in the Resources box and click
or drag and drop it from the Resources box to the display field box on the right. If a field is not required, select it and click
or drag and drop it to the Resources box. Click
or
to adjust the order of the fields. If required, modify the display name of any fields by clicking its Display Name text box. You can also click the Sort Fields By button to specify the field on which the sorting will be based and the sorting manner as required (for details, refer to Sorting the Data).

- In the Group screen, add group objects as the grouping criteria. For more information about data grouping, see Grouping the Data.

- In the Summary screen, add aggregation objects to summarize data in the banded object as follows: in the sum on box on the right, specify the group to which the aggregation will be applied (if you select Banded Object, it will be based on the whole business view), select an aggregation object in the Resources box and click
or drag and drop it to the right box. You can add several aggregations for any group level. If an aggregation is not required, select it and click
or drag and drop it to the Resources box. Click
or
to adjust the order of the aggregations in the current group or move an aggregation to another group if needed.
The Position and Column columns work together to show the positions of the aggregations. When an aggregation is added right below the Banded Object node, the aggregation and its label will be placed in the intersection of the banded footer
panel and the first two detail columns.
When an
aggregation is added below a specific group node, the aggregation and its label will be placed in the intersection of the group footer panel and the first two detail columns.

- To apply 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. For how to define a filter, refer to Filtering the Data.

- In the Style screen, specify the style of the banded object.

If you have specified to insert the banded object into another banded object, by default the banded object will inherit its parent's style. If you want to apply another style to the banded object, uncheck the Inherit Style option and then select the required style from the Style box. For more information, see Inheriting Styles.
- Click Finish to insert the banded object.
If you have specified to insert the banded object in the report body or tabular cell, the banded object will be inserted there upon clicking the Finish button; otherwise, click the mouse button in the location to insert the banded object.
Besides using the wizard, you can also drag a blank banded object to the report. To do this:
- From the Basic category of the Components panel, drag the Banded Object button
to a destination in the report which allows the insertion of a banded object. A blank banded object is then created.
- All the business views used in the current page report can be used as the data resource of the banded object. To locate a business view, select the data component that uses the business view. The business view is then displayed in the Data panel.
- Drag the required fields from the Data panel into the banded panels.
Inserting a banded object based on a query resource
- Position the mouse pointer at the destination where you want to insert the banded object. It can be in an empty area of the page report or inside another banded object.
- Click Insert > Banded Object or Home > Insert > Banded Object. The Create Banded Object wizard appears.
- In the Data screen, select the data resource on which to create the banded object. If the given data resources are not what you want, click the first item in the corresponding resource node to create one. When a query is selected, click the Edit button to modify the query if required. Then a new dataset based on the selected data resource is created in the page report.
If you want to use an existing dataset in the current report to create the banded object, click the More Options button and then:
- Check the Existing Dataset radio button and select a dataset. You can click the Edit button to modify the selected dataset in the Dataset Editor if necessary, or click the <New Dataset...> item to create a new dataset in the page report to use. It is always better to use an existing dataset rather than create a new one. Even when the two datasets are based on the same query, JReport will still run the query separately for each dataset.
- Check the Current Dataset radio button to make the banded object inherit the dataset from its parent.

- In the Display screen, add the fields to be displayed as detail field in the banded object. To add a field, select it in the Resources box and click
or drag and drop it from the Resources box to the display field box on the right. If a field is not required, select it and click
or drag and drop it to the Resources box. Click
or
to adjust the order of the fields. If required, modify the display name of any added field by clicking its Display Name text box. You can also click the Sort Fields By button to specify the fields on which the sorting will be based and the sorting manner as required (for details, refer to Sorting the Data).

- In the Group screen, add the fields as the grouping criteria. For more information about data grouping, see Grouping the Data.

- In the Summary screen, add fields as summary fields to summarize data in the banded object as follows: in the sum on 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), select a field in the Resources box and click
or drag and drop it to the right box, then specify the aggregate function as required. You can add several summaries for any group level. JReport will automatically give the summaries proper name labels to help you clarify the meaning of the numbers. If a summary is not required, select it and click
or drag and drop it to the Resources box. Click
or
to adjust the order of the summaries in the current group or move a summary to another group if needed.
The Position and Column columns work together to decide the positions of the summaries. When a summary is added right below the Banded Object node, specify whether to place it in the banded footer or header panel from the Position drop-down list and whether to place it in the detail column or a new summary column from the Column drop-down list.
The summaries created from the Summary screen will be added to the current catalog data source as static summaries even when identical summaries already exist. Therefore, it is better not to create summaries here, instead you can add dynamic summaries to the catalog and drag and drop the dynamic summaries into the banded object after it is created.

- To apply 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. For how to define a filter, refer to Filtering the Data.

- In the Style screen, specify the style of the banded object.

If you have specified to insert the banded object into another banded object, by default the banded object will inherit its parent's style. If you want to apply another style to the banded object, uncheck the Inherit Style option and then select the required style from the Style box. For more information, see Inheriting Styles.
- Click Finish to insert the banded object.
If you have specified to insert the banded object in the report body or tabular cell, the banded object will be inserted there upon clicking the Finish button; otherwise, click the mouse button in the location to insert the banded object.
Besides using the wizard, you can also drag a blank banded object to the report. To do this:
- From the Basic category of the Components panel, drag Banded Object button
to a destination in the report which allows the insertion of a banded object. A blank banded object is then created.
- In the Data panel, select the dataset in the current page report with which you want to create the banded object from the dataset drop-down list, or select <Choose Data from...> from the list to create a new a dataset for the banded object.
- Drag the required fields in the specified dataset from the Data panel into the banded panels.
When a banded object is inserted into another banded object, you can set up data container link between the banded object and its parent.
Notes:
- When inserting a banded object using wizard,
- Groups in the banded object will be indented according to the Customize group indent option setting in the Options dialog.
- By default all the summaries will be aligned horizontally in the banded object. If you want to align them vertically, check the option Align summaries vertically in the Options dialog in advance.
- When you insert an object whose height is determined at runtime into the BandedPageFooter panel (for example, a subreport), but do not set the height of the panel high enough to hold this object, the object might get overlapped with the ones that are in the panel which is above the BPF panel at runtime.
See also:
- Horizontal Banded Wizard for detailed explanation about options in this wizard.
- Mailing Label Wizard for detailed explanation about options in this wizard.
- An example: The SampleComponents catalog, included with JReport Designer, contains reports that have examples of report component types. For the banded object component example, open
<install_root>\Demo\Reports\SampleComponents\BandedObjectReport.cls
.
Previous Page Next Page