In some cases you may want to pass data from the subreport back to the main report. Script variables can't be used for this because each report has its own script scope (this avoids the possibility of conflicting variable names).
To pass data from a subreport back to the main report, you have to store values in subreport fields or in the subreport's Tag property, then have the main report read those values.
In this sample, the subreport calculates the average unit price per product category and stores that value in its Tag property. The main report retrieves and displays that value.