Inserting a Banded Object
With the banded object wizard, it is easy to create banded objects in a report, however the wizard varies with the data resource type used for the banded object: business view or query resource.
A web report can only use business views. For a page report it can be created either based on query resources or business views, which 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. When a banded object is inserted into another banded object in a page report, you can set up data container link between the banded object and its parent.
This topic shows creating banded objects using different data resources in detail:
Creating a Banded Object Based on a Business View
- Position the mouse pointer at the destination where you want to insert the banded object.
- Select Insert > Banded Object or Home > Insert > Banded Object.
The Create Banded Object wizard appears, which contains a set of screens for helping you define a banded object easily. You can use the Back and Next buttons or select the screen name on the screen navigation bar to switch between the screens.
- In the Data screen, select the business view in the current catalog using which to create the banded object.
- In the Display screen, add data fields to display as detail fields in the banded object.
The Resources box lists the group objects and detail objects in the specified business view, as well as the dynamic formulas used as Group and dynamic formulas used as Detail created for the business view in the current report. You can use them as detail fields in the banded object.
To add a detail field, select a field in the Resources box, then select or drag and drop it to the right box; to remove an unwanted detail field, select it and select or drag and drop it to the Resources box. You can make use of and to adjust the display order of the detail fields in the banded object. By default the display names of the added fields will be used to label the corresponding detail columns; to edit the label text for a detail column, select in the Display Name text box and enter a new one; if you want to automatically map the label text to the dynamic display name of the field at runtime, check the Auto Map Field Name checkbox in the text box. If needed, select the Sort Fields By button to specify in which manner to sort the detail values the same as you do for a table.
- In the Group screen, specify the criteria for grouping data in the banded object the same as you do for a table.
- In the Summary screen, add summaries to calculate data in the banded object.
The Resources box lists the aggregation objects in the specified business view, as well as the dynamic aggregations created for the business view in the current report. You can add them as summaries to calculate data in the banded object.
To add a summary, in the right box select the group to which the summary will be applied (if you select Banded Object, it will be based on the whole business view), select a field in the Resources box and select or drag and drop it to the right box. You can add several summaries for any group level, and if a summary is not required, select it and select or drag and drop it to the Resources box. To adjust the display order of the summaries in the current group or move a summary to another group, make use of and . The position of the summaries in the banded object is determined by the Position and Column options and cannot be changed: a summary added for the Banded Object level is placed in the intersection of the banded footer panel and the first two detail columns with its name label which is the display name of the field used for the summary by default; a summary added for a specific group is placed in the intersection of the group's footer panel and the first two detail columns with its name label.
- In the Filter screen, apply a filter to reduce the data displayed in the banded object. You can select a predefined filter of the specified business view from the Filter drop-down list to apply, or select User Defined in the list to define a new filter as required.
- In the Style screen, specify the style of the banded object.
When you have specified to insert the banded object into another banded object in a page report, 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.
- Select Finish to insert the banded object.
If you have selected a panel in another banded object as the banded object destination in a page report, after finishing the wizard you need to select the mouse button in the destination once again in order to insert the banded object there.
Besides using the wizard, you can also drag a blank banded object to the report.
- From the Basic category of the Components panel, drag 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 report can be used as the data source 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 view elements and dynamic resources from the Data panel into the banded panels.
Creating a Banded Object Based on a Query Resource
- Position the mouse pointer at the destination where you want to insert the banded object.
- Select Insert > Banded Object or Home > Insert > Banded Object.
The Create Banded Object wizard appears, which contains a set of screens for helping you define a banded object easily. You can use the Back and Next buttons or select the screen name on the screen navigation bar to switch between the screens.
- In the Data screen, select the data resource in the current catalog using which to create the banded object.
If the predefined data resources are not what you want, select the first item in the corresponding resource node to create one. When a query is selected, you can 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 page 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 data fields to display as detail fields in the banded object.
The Resources box lists all the DBFields in the specified data resource, as well as the formulas and parameters that are valid to these DBFields in the current catalog. You can use them as detail fields in the banded object.
To add a detail field, select a field in the Resources box and select or drag and drop it from the Resources box to the right box; to remove an unwanted detail field, select it and select or drag and drop it to the Resources box. You can make use of and to adjust the display order of the detail fields in the banded object. By default the display names of the added fields will be used to label the corresponding detail columns; to edit the label for a detail column, select in the Display Name text box and enter a new name. If needed, select the Sort Fields By button to specify in which manner to sort the detail values the same as you do for a table.
- In the Group screen, specify the criteria for grouping the data in the banded object the same as you do for a table.
- In the Summary screen, add summaries to calculate data in the banded object.
The Resources box lists all the DBFields in the specified data resource, as well as the formulas that are valid to these DBFields in the current catalog. You can create summaries based on these fields in the banded object.
To add a summary, in the right box, select the group to which the summary will be applied (if you select Banded Object, it will be based on the whole dataset), select a field in the Resources box and select or drag and drop it to the right box, then specify the aggregate function as required. When DistinctSum is selected as the aggregate function, you should select in the Distinct On text box to specify one or more fields according to whose unique values to calculate DistinctSum using the Select Fields dialog. From the Position and Column drop-down lists select the position of the summary: when a summary is added for the Banded Object level, you can place it and its name label in the intersection of the banded footer panel (Footer)/banded header panel (Header) and the first two detail columns (Detail)/a new summary column (Summary); for a summary added to a specific group, you can place it and its name label in the intersection of the group footer panel/group header panel and the first two detail columns/a new summary column. You can add several summaries for any group level and if a summary is not required, select it and select or drag and drop it to the Resources box. To adjust the display order of the summaries in the current group or move a summary to another group, make use of and . After the banded object is created, Logi JReport will automatically give the summaries proper name labels to help you clarify the meaning of the numbers.
The summaries created from the Summary screen will be added to the current catalog 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.
- In the Filter screen, add filter conditions on the fields that have been added to the banded object to reduce the data. For how to define a filter, Select here.
- In the Style screen, specify the layout and style of the banded object.
In the Grow Report box, specify whether to create a vertical banded object, horizontal banded object, or mailing label banded object. In the Style box select the style of the banded object. When 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.
- Select Finish to insert the banded object.
If you have selected a panel in another banded object as the banded object destination, after finishing the wizard you need to select the mouse button in the destination once again in order to insert the banded object there.
Besides using the wizard, you can also drag a blank banded object to the report.
- From the Basic category of the Components panel, drag 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 data fields in the specified dataset from the Data panel into the banded panels.
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 banded page footer panel (BPF), 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.