Within each sub, you would have to set up the value you want to use in the main report as a shared variable:
whileprintingrecords;
shared numbervar x := <yoursubvaluehere>;
Repeat, but change the variable name in the second sub, e.g., to "y".
Then in the main report, in a section below the ones containing your subreports, use a formula, e.g., like this:
whileprintingrecords;
shared numbervar x;
shared numbervar y;
x%y
If you are calculating at a group level, you should also reset your shared variables in additional formulas.
-LB