If I understand you correctly you can use variable formulas or Running Totals (placed in the group footers) for this.