I have needed this in the past in CR ver 9 reports. Here is one approach using Shared variables if your CR version and environment permits.
Initialize a Shared variable(s) in the Main report header, subsection a. Create a subreport in Main Report header subsection b to force it to run after initializing the Shared variable, but before the balance of your report.
Suppress all the sections in the Subreport to hide it and select the same data in that subreport as the Main report. Determine the report total(s) you need and assign them to the Shared variable(s):
MAIN-RHa
I_A
WhilePrintingRecords;
Shared NumberVar Array A := [O, 0, 0]
Subreport
S_A in the details section
WhilePrintingRecords;
Shared NumberVar Array A;
ReDim Preserve A[3];
A[1] := A[1] + {database_field}
Main-G1F
P_A
WhilePrintingRecords;
Shared NumberVar Array A;
ReDim Preserve A[3];
A[1]
Shared variable A[1] will now contain the sum of the field values for all records in all group levels in the report and can be printed, or used in the formulas, in the Group 1 Footer. The ReDim Preserve stmts seemed to be neccessary in my reports to prevent dimensioning errors as the Shared variables are passed yet preserving the values already in the array. All avoided of course if you dont use or need arrays. Hope this helps, have a great day.