SHARED VARIABLES
Shared variables are used to pass values from sub report to the main report.
(if you want to summarize totals from a sub report with totals from the main report, you would use the following formulas to pass the value from the sub report to main report.
SUB REPORT whileprintingrecords;
SHARED Numbervar X := x + {field};
MAIN whileprintingrecords;
SHARED Numbervar X;
X
Shared variables can not be suppressed. I make the font white and the field very small.
They must be placed below the subreport to retrieve the value.