Managing the Aggregate Fields in a Crosstab
The following fields can be used as aggregate fields to summarize data in crosstabs:
- Query fields, formulas or crosstab formulas in query resources
- Detail fields, aggregation fields, or dynamic formulas/aggregations in business views
Logi JReport provides you with the following methods to manage the aggregate fields in crosstabs easily:
When a crosstab is created, you can further drag and drop fields from the Data panel to the crosstab to add more aggregate fields to summarize data in the crosstab.
- Select View > Data to display the Data panel if it is not displayed.
- In the Data panel, select a field that can be used as an aggregate field and drag it above or under the desired subtotal or grand total cell until a blue line appears, then release the mouse button. The Insert Aggregation dialog appears.
- From the Aggregate Function drop-down list, specify the function to summarize the selected field.
If the selected field has been predefined with an aggregate function, you cannot edit the function any more, and the drop-down list is changed to the Aggregation text box with the name of the field displayed in it.
- In the Label text field, specify a display name for the aggregate field if needed, which will label the newly created summaries. However, whether the label you specify would be displayed depends on if you have added any labels to label the columns/rows/summaries in the crosstab while creating it with the report wizard. If no label is defined in the report wizard, the label you add in the Insert Aggregation dialog will be ignored.
- Select OK and a new aggregate cell is added to the crosstab.
When you have added an aggregate field using this way, in the Display screen of the Crosstab Wizard, you can find the new aggregate field in the Summaries box along with the specified function and display name.
For the aggregate field that has no predefined aggregate function in a crosstab, you can switch the function it uses at anytime. To do this:
- Right-click the aggregate field and select Switch Aggregate Function from the shortcut menu.
- Choose a new function from the submenu.
- View the crosstab and the values are recalculated based on the new function.
To remove an aggregate field from a crosstab, right-click the field and select Remove Aggregation on the shortcut menu.