IPivotTableHeader.IsEvaluatedSlot

Fore Syntax

IsEvaluatedSlot: Boolean;

Fore.NET Syntax

IsEvaluatedSlot: boolean;

Description

The IsEvaluatedSlot property returns whether the header element is a calculated column or row.

Comments

Available values:

The values in calculated columns and rows are calculated by the formula consisting of table dimension attributes.

NOTE. A number of calculated rows and columns may slow down table performance due to calculation of formulas of calculated rows and columns.

To get the collection of calculated columns or rows, use the IPivotHeader.EvaluatedSlots property.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS_SLOTS identifier. This report must include a data table.

Add links to the Express, Metabase, and Pivot system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Report: IEaxAnalyzer;
    Pivot: IPivot;
    TableHeader: IPivotTableHeader;
    i: Integer;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Receive express report
    Report := mb.ItemById("EXPRESS_SLOTS").Bind As IEaxAnalyzer;
    // Get object, based on which data table is created
    Pivot := Report.Pivot;
    // Get table sidehead properties
    TableHeader := Pivot.ObtainTable.LeftHeader;
    // Display indexes of calculated columns in table sidehead
    Debug.WriteLine("Indexes of calculated columns in table sidehead");
    For i := 0 To TableHeader.SlotCount - 1 Do
        If TableHeader.IsEvaluatedSlot(i) Then
            Debug.WriteLine(i);
        End If;
    End For;
End Sub UserProc;

After executing the example the console window displays indexes of calculated columns in table sidehead.

Fore.NET Example

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;
    Report: IEaxAnalyzer;
    Pivot: IPivot;
    TableHeader: IPivotTableHeader;
    i: Integer;
Begin
    // Get current repository
    mb := Params.Metabase;
    // Receive express report
    Report := mb.ItemById["EXPRESS_SLOTS"].Bind() As IEaxAnalyzer;
    // Get object, based on which data table is created
    Pivot := Report.Pivot;
    // Get table sidehead properties
    TableHeader := Pivot.ObtainTable().LeftHeader;
    // Display indexes of calculated columns in table sidehead
    System.Diagnostics.Debug.WriteLine("Indexes of calculated columns in table sidehead");
    For i := 0 To TableHeader.SlotCount - 1 Do
        If TableHeader.IsEvaluatedSlot[i] Then
            System.Diagnostics.Debug.WriteLine(i);
        End If;
    End For;
End Sub;

See also:

IPivotTableHeader