On the left hand side of the screen should be the Field Explorer. In that list is a group called 'Running Total Fields'. If you expand that list you'll see all running total fields for a report. If you right click one of those fields one of your options is 'Edit'.
The edit box has a whole bunch of different options. Summarizing a field by sum, or average, or minimum, maximum, etc. etc. etc.
You can also just find where the running total is being used in the report and right click the field its self to bring up the 'Edit' GUI.
If you're asking about code at a deeper level than this GUI, that is not revealed to the end user outside of this GUI/Wizard style format.