Inserting a Banded Object
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.
Below is a list of the sections covered in this topic:
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.
- Select 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 group and detail objects to be displayed in the banded object. To add an object, select it in the Resources box and select or drag and drop it from the Resources box to the display field box on the right. You can add only one object at a time. If an object is not required, select it and select or drag and drop it to the Resources box. Select or to adjust the order of the objects. If required, modify the display name of any added object by selecting its Display Name text box. You can also select the Sort Fields By button to specify the objects 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 the aggregations to be displayed in the banded object. In the right box, specify the group to which the aggregation will be applied (if you select Banded Object, the aggregation will be based on the whole business view), select an aggregation in the Resources box and select or drag and drop it to the right box. You can add several aggregations for any level. Logi JReport will automatically give the aggregations proper name labels to help you clarify the meaning of the numbers. If an aggregation is not required, select it and select or drag and drop it to the Resources box. Select or to adjust the order of the aggregations in the current group or move an aggregation to another level if needed.
- 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.
- Select 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 selecting the Finish button; otherwise, select 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 provide data resources to the banded object. To locate a business view, select the component that uses the business view. The business view will be 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.
- Select 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, select the first item in the corresponding resource node to create one. When a query is selected, select 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, select the More Options button and then:
- Check the Existing Dataset radio button and select a dataset. You can select the Edit button to modify the selected dataset in the Dataset Editor if necessary, or select 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, Logi 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 in the banded object. To add a field, select it in the Resources box and select or drag and drop it from the Resources box to the display field box on the right. You can add only one field at a time. If a field is not required, select it and select or drag and drop it to the Resources box. Select or to adjust the order of the fields. If required, modify the display name of any added field by selecting its Display Name text box. You can also select 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.
- To add summaries, go to the Summary screen. 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 as the summary field and select or drag and drop it to the box, then select the function for the summary from the Aggregate Function column. You can add several summaries for any group level. Logi JReport will automatically give the summaries proper name labels to help you clarify the meaning of the numbers. If a field is not required, select it and select or drag and drop it to the Resources box. Select or to adjust the order of the summary fields in the current group or move a summary field to another group if needed.
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.
- Select 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 selecting the Finish button; otherwise, select 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 Logi 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
.