ShowHierarchy method: CubeCollection class

Syntax

ShowHierarchy(DimName, Show, ExpandToLevel)

Description

Use the ShowHierarchy method to either hide or display the cube collection hierarchy.

If there is a tree attached to the dimension, and Show is false, only the detail level members are shown in the Analytic grid. If Show is true, all members including nodes are shown.

When the hierarchy is hidden, the GetData method returns only leaf values. When the hierarchy is displayed, GetData returns node values and leaf values.

The ExpandToLevel parameter expands the hierarchy to the level specified. Level indexes start from 0 , the root level.

For example, if you specify ExpandToLevel as 1, the grid displays the total (root member) and all the detail members in a dimension with no tree attached.

In the following example, if you specify ExandToLevel as 2, the hierarchy would be displayed only to the quarter level, and not to the month level.

ALL_TIME
     2003
          Q1
               Jan
               Feb
               Mar
          Q2
               Apr
               May
               Jun
          Q3
               . . .
               . . .
          Q4
     2004
          Q1
          Q2
          Q3
          Q4

Parameters

Parameter Description

DimName

Specify the name of the dimension for which you want to either display or hide the hierarchy.

Show

Specify whether to display or hide the hierarchy. This parameter takes a Boolean value; true to display the hierarchy, false to hide it.

ExpandToLevel

Specify to what level to expand the hierarchy, as a number.

Returns

None.