We will introduce Summary by groups function of FineReport reporting tool in this article.In grouping reports, it is often necessary to summarize data by groups.

1. Description

In grouping reports, it is often necessary to summarize data by groups. For example, summarize sales of each region:

2. Creating steps

2.1 Open report

Open the report of %FR_HOME%\WebReport\WEB-INF\reportlets\docdoc\Primary\GroupReport\Group_1.cpt.

2.2 Set summary of parent cell

Add a row of summary below to sum up sales volume, and set the cell of Region as the left parent cell of the cell of “Subtotal”:

As shown in the preview template, the row of “Subtotal” is copied following the extension of the parent cell Region, i.e., subtotaling each extended region, shown in blue.

2.3 Summary of parent cell with no setting

Add a row of summary again, and set no parent cell, i.e., the cell of “Subtotal” has no parent cell:

As shown in the preview template, the row of “Subtotal” remains at the bottom and is displayed after extension of all cells above, shown in red.

2.4 Save and issue reports

For completed templates, refer to %FR_HOME%\WebReport\WEB-INF\reportlets\doc\Primary\GroupReport\Group_2.cpt.

Click Group_2.cpt to check template effect online.