Navigating grouped data through the Totaller

The Totaller represents the manner in which data is grouped in the report. It is basically a tree consisting of multiple, distinct nodes representing the data from various grouping levels of the report. There is one Totaller for each report and one distinct node for each item of data of a grouping level.There is one level in the tree for each level of grouping in the report.
Assume a report was created with three groups, the first sorted by country, the second by province, and the third by city. The first node will have a collection of child nodes that represent each country. That is, for each country (UK, Canada, USA, and so on) there will be a corresponding Totaller node. Each of these nodes will have a collection of subnodes that represent each province within each country, and their subnodes represent each city within each province. The resulting Totaller may look something like this.
To access a node in the Totaller you must obtain the group path of the Totaller node.
Using group paths
A group path is a string that represents the position of a node in the tree and consists of either a group path name or a set of numbers separated by a hyphen. The GroupPath object is used by the RAS to represent a group path. The following diagram illustrates all of the possible representations of a group path in a Totaller tree for a report grouped by country, province, and city.
There are two ways to obtain the group path of a node: either you must know the structure of the data beforehand, or you must navigate the tree starting with an empty group path and keep track of the group path as you navigate.