IsStairCell(Row: Integer; Column: Integer): Boolean;
IsStairCell[Row: Integer; Column: Integer]: Boolean;
The IsStairCell property returns whether stairs hierarchy is used in a cell.
Row - cell row index.
Column - cell column index.
The property returns True if a cell is a hierarchy step.
Executing the example requires an express report with the EXPRESS identifier. In the report, on the Layout sidehead tab, the use of stairs hierarchy for titles should be enabled (see Use Stairs Hierarchy or StairsHierarchy). At least two dimensions should be present in the sidehead.
Add links to the Pivot, Express, and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Table: IPivotTable;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get display settings for report data table
Pivot := Express.Pivot;
// Get table properties
Table := Pivot.ObtainTable;
// Check if cell is a hierarchy step
If Table.IsStairCell(0, 0) Then
Debug.WriteLine("Table cell is a hierarchy step");
Else
Debug.WriteLine("Table cell is not a hierarchy step");
End If;
End Sub UserProc;
After executing the example it is checked if the cell is a hierarchy step, and the console displays the appropriate message.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Table: IPivotTable;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
// Get display settings for report data table
Pivot := Express.Pivot;
// Get table properties
Table := Pivot.ObtainTable();
// Check if cell is a hierarchy step
If Table.IsStairCell[0, 0] Then
System.Diagnostics.Debug.WriteLine("Table cell is a hierarchy step");
Else
System.Diagnostics.Debug.WriteLine("Table cell is not a hierarchy step");
End If;
End Sub;
See also: