I use group header in my reports, so i also have group footer which presents the sums of items contained in the master detail of a single group.

In the bottom of the report, i have a band "Report Summary" whic should calculate and present the total on the whole report. Calculating a sum of values goes very simple : in the given memo's editor i write some code like :

`[SUM([myLazarusQuery.MyFloatfield],BandName)]`

But there is a case when I should subtract some groups from the total of all sums.

There should be a way to subtract totals of a certain Group, since there is a Grouping criteria-field, how can I do that ?