Two rows must be added to the grader report table: one for the group totals, and one for the grand totals. Both of these are displayed if a user setting is switched on (grade_report_showgrandtotals and grade_report_showgroups), or the same in $CFG.
Other preferences will need to be considered, such as whether to display raw totals or percentages, or means etc...
grade_report_grandtotalsdisplaytype is now implemented for that purpose.