Check out the group by 3 properties example report, copied below. Hope this helps.
The report templates in this folder are intended to supplement the Custom Reports User Guide (available from the Help menu). Many contain examples of advanced reporting features. For basic information on custom reports, you should consult the user guide. You can generate reports from all templates in this folder to see how they behave. If you have not already, you should click the “Edit Template” button to view the report template and see how it is constructed.
You can group by an arbitrary number of properties, although 3 levels is probably the limit of usefulness. The thing to note in this example is that the endgroupCurrentGroup keywords must include the “By” portion of the group keyword so that Case Complete can distinguish between them (e.g. endgroupCurrentGroupByPriority). With 2 levels or less, you can just use endGroupCurrentGroup.
Use Cases grouped by release, then by Assigned to, then by priority, then sorted by ID:
Assigned To: $AssignedTo
$tableCurrentGroupSortID $ID $Name