GetSlotName(Dimension: Boolean; Attribute: Boolean; SlotNumber: Integer): String;
Dimension. Definition of the dimension name output.
Attribute. Definition of dimension attribute name output.
SlotNumber. Slot index in the table header.
The GetSlotName method returns table header slot name.
Executing the example requires that the repository contains an express report with a data table with the EXPRESS_SLOTS identifier.
Add links to the Express, Metabase, Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IEaxAnalyzer;
Pivot: IPivot;
TableHeader: IPivotTableHeader;
Dim: String;
Begin
// Get current repository
MB := MetabaseClass.Active;
// Get express report
Report := MB.ItemById("EXPRESS_SLOTS").Bind As IEaxAnalyzer;
// Get object, based on which data table is built
Pivot := Report.Pivot;
// Get table header properties
TableHeader := Pivot.ObtainTable.TopHeader;
// Get dimension name in the first table header row
Dim := TableHeader.GetSlotName(True, False, 0);
// Compare obtained name with the specified one
If Dim = "Calendar" Then
// Display dimension key with the Calendar name to the console
Debug.WriteLine(TableHeader.ElementDimKey(0, 1).ToString);
// Display name of the obtained dimension in the console
Else Debug.WriteLine(Dim);
End If;
End Sub UserProc;
After executing the example, after checking the dimension name the console window displays calendar dimension key or name of the table first row header dimension.
See also: