StairsHierarchy: Boolean;
StairsHierarchy: boolean;
The StairsHierarchy property determines whether stairs hierarchy is used.
Available values:
True. Stairs hierarchy is used.
False. Default. Stairs hierarchy is not used.
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.
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(1, 0) Then
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.
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[1, 0] Then
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: