You have to calculate the sub-group sums yourself and store it along your other row data.
an example for groups can be seen in the demo
the table has two content rows, and one row has a group expression set. This row is only
printed when the group expression changes.
To show group sums create a parameter list, e.g. with the following fields
"name", "group", "price", "group_price"
test data could look like
"apple", "fruits", 2, 2
"orange", "fruits", 3, 5
"banana", "fruits", 2, 7
"tomato", "vegetables", 3, 3
"potato", "vegetables", 1, 4
"salad", "vegetables", 2, 6
so the last value is the current group sum, when the group changes this value will be used (-> group_price for fruits is 7, group_price for vegetables is 6)
create a table with 2 content rows, the last content row has the group expression set for ${group} and in the row cell you can print the ${group_price}
Alex