A hierarchical addressing scheme is available for the DataAccess
object. This approach is useful when you need a logical view of data or when you are working with a user interface that deals with unique lists of member values picked from a set of members.
In positional addressing, you use a slice index to locate a member along an edge. The slice index ranges from 0 to one less than the total number of members in the bottom layer on an edge.
In hierarchical addressing, members are defined by their location within the hierarchy of layers that exist above them on an edge. A hierarchical index, which is called an hIndex , is assigned to each member in each layer. The hIndex
is based on the members position under its parent in the layer above. This means that an hIndex
equal to zero is assigned to the first member that exists under every member in a higher layer.
The following diagram shows a column edge in a crosstab.
The array of hIndex
values that specifies a member is called an hPos array. The hPos
array has an hIndex
for each layer. If a member has no value in a layer, then its hIndex
in that layer is -1. The following table shows the hPos
array for each member in the example's column edge:
Member |
hPos Array |
---|---|
2001 |
0, -1 |
2002 |
1, -1 |
Boston under 2001 |
0, 0 |
New York under 2001 |
0, 1 |
Atlanta under 2001 |
0, 2 |
Boston under 2002 |
1, 0 |
New York under 2002 |
1, 1 |
Atlanta under 2002 |
1, 2 |
The methods of the DataAccess
object include both positional addressing and hierarchical addressing. You can identify methods that use hierarchical addressing by an hPos
parameter or return code.