IPivotHeader.StairsHierarchy

Fore Syntax

StairsHierarchy: Boolean;

Fore.NET Syntax

StairsHierarchy: boolean;

Description

The StairsHierarchy property determines whether stairs hierarchy is used.

Comments

Available values:

It is reasonable to use this property if several dimensions or levels of one dimension are located by rows or columns.

If the property is set to True, the IPivotDimensionLevelPropertiesCommon.ChildrenBeforeParents property is not considered.

To get whether table header element is a hierarchy stair, use the IPivotTableHeader.IsStairElement property.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. Two dimensions should be present in the report sidehead.

Add links to the Express, Metabase and Pivot system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Pivot: IPivot;
    LeftHeader: IPivotHeader;
    TableHeader: IPivotTableHeader;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get display settings of report data table
    Pivot := Express.Pivot;
    // Get collection of dimensions located by rows
    LeftHeader := Pivot.LeftHeader;
    // Use stair hierarchy
    LeftHeader.StairsHierarchy := True;
    // Get properties of table row headers
    TableHeader := Pivot.ObtainTable.LeftHeader;
    // Check whether an element is a hierarchy step
    If Not TableHeader.IsStairElement(10Then
        Debug.WriteLine("Table row header element is not a hierarchy step");
    Else
        Debug.WriteLine("Table row header element is a hierarchy step");
    End If;
    // Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the table sidehead is used as a stairs hierarchy, it is checked if table row header element is a hierarchy stair.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Pivot: IPivot;
    LeftHeader: IPivotHeader;
    TableHeader: IPivotTableHeader;
Begin
    // Get repository
    MB := Params.Metabase;
    // Get express report
    Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
    // Get display settings of report data table
    Pivot := Express.Pivot;
    // Get collection of dimensions located by rows
    LeftHeader := Pivot.LeftHeader;
    // Use stair hierarchy
    LeftHeader.StairsHierarchy := True;
    // Get properties of table row headers
    TableHeader := Pivot.ObtainTable().LeftHeader;
    // Check whether an element is a hierarchy step
    If Not TableHeader.IsStairElement[10Then
        System.Diagnostics.Debug.WriteLine("Table row header element is not a hierarchy step");
    Else
        System.Diagnostics.Debug.WriteLine("Table row header element is a hierarchy step");
    End If;
    // Save changes
    (Express As IMetabaseObject).Save();
End Sub;

See also:

IPivotHeader | Stair Hierarchy