IPivotTableHeader.ElementDim

Syntax

ElementDim(SlotNumber: Integer; ElementNumber: Integer): IDimInstance;

Parameters

SlotNumber. Slot index in the table header.

ElementNumber. Element index in the table header.

Description

The ElementDim property returns data about dimension that is present in the table header.

Example

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, Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report: IEaxAnalyzer;
    Pivot: IPivot;
    TableHeader: IPivotTableHeader;
    DimKey, Element: Integer;
    DimInst: IDimInstance;
Begin
    
// Get the current repository
    MB := MetabaseClass.Active;
    
// Get express report
    Report := MB.ItemById("EXP_SLOTS").Bind As IEaxAnalyzer;
    
// Get object, based on which data table is built
    Pivot := Report.Pivot;
    
// Get properties of table column headers
    TableHeader := Pivot.ObtainTable.TopHeader;
    // Get dimension name and key in the second cell of the first column header
    DimInst := TableHeader.ElementDim(01);
    DimKey := TableHeader.ElementDimKey(
01);
    Debug.WriteLine(
"Name: " + DimInst.Name + ", Key: " + DimKey.ToString);
    
// Get dimension element index
    Element := TableHeader.DimensionElement(DimKey, 1);
    Debug.WriteLine(
"Index: " + Element.ToString);
End Sub UserProc;

After executing the example the console window displays name, key, and index of the dimension, which is present in the second cell of the first column header:

Name: Data types, Key: 10200

Index: 0

See also:

IPivotTableHeader