you will be using shared variables to convey the information.
In your subreport you will create a formula a place it probably in the report footer. It will look something like:
shared numbervar sub1Total;
//assign it the value
sub1Total := something, could be a SUM() or a varaible or anything
"" // hides the assignment on the subreport
in the main report you will create a formula and place it after the subreport in whichever section you need. It will look like:
shared numbervar sub1Total;
if you just want to display the result, you're done. If you need to sum all of them up, you will need to create variables and increment them as desired and display as desired.
I use shared for all my variables, as it is simpler to remember the scoping. To assign a value to a variable you use := to compare =
HTH