IPivotEvaluatorDimCalculatesItem.FindByDimElement

Syntax

FindByDimElement(Element: Integer): IPivotEvaluatorDimCalculatesList;

Parameters

Element - dimension element index.

Description

The FindByDimElement method searches for all calculated factors created relatively to a dimension element, which index is passed by the Element parameter.

Example

Executing the example requires a form with the Button1 button, the UiErAnalyzer component named UiErAnalyzer1, and any components that are used for displaying data of a report loaded into the UiErAnalyzer1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    OLAP: IEaxAnalyzer;
    Grid: IEaxGrid;
    Pivot: IPivot;
    Dim: IDimInstance;
    Calcs: IPivotEvaluatorDimCalculates;
    Calc: IPivotEvaluatorDimCalculatesItem;
    List: IPivotEvaluatorDimCalculatesList;
    i: Integer;
Begin
    OLAP := UiErAnalyzer1.ErAnalyzer;
    Grid := OLAP.Grid;
    Pivot := OLAP.Pivot;
    Dim := Pivot.TopHeader.Dim(0);
    Calcs := Pivot.Evaluator.DimCalculates;
    Calc := Calcs.FindByDimKey(Dim.Key);
    List := Calc.FindByDimElement(0);
    For i := 0 To List.Count - 1 Do
        Debug.WriteLine(Calc.CalculatedName(List.Item(i)));
    End For;
End Sub Button1OnClick;

After executing the example clicking the button initiates a search for calculated factors that were created relatively to the first element of a dimension arranged in columns in a report. Names of the found calculated factors are displayed in the development environment console.

See also:

IPivotEvaluatorDimCalculatesItem