It may also be useful to use a regular or precalculated variable that only considers data rows in break ranges. For example printing a running average for detail rows in breaks, or printing the total average calculated for a break range in the header for that period.
For this purpose, variables may be reset on break boundaries. See examples of such variables in Reset on break attribute and Precalculate attribute in the Variable node section of the Report XML description chapter.