IPivotTableHeader.ContainsKey

Syntax

ContainsKey(SlotNumber: Integer; DimensionKey: Integer): Boolean;

Parameters

SlotNumber. Slot index in the table header.

DimensionKey. Dimension key contained in the table header.

Description

The ContainsKey method determines whether the dimension with the specified key is present in the table header slot.

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

Sub UserProc;
Var
    MB: IMetabase;
    Report: IEaxAnalyzer;
    Pivot: IPivot;
    TableHeader: IPivotTableHeader;
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;
    
// Check if the dimension with the  10127 key is present in the first header slot
    If TableHeader.ContainsKey(010127) = True Then
        Debug.WriteLine(
"Dimension with the 10127 key is present in the table header");
        
Else Debug.WriteLine("Dimension with the 10127 key is not present in the table header");
    
End If;
End Sub UserProc;

After executing the example the console window displays the message whether the dimension with the specified key is present in the table header.

See also:

IPivotTableHeader