IPivotEvaluatorDimCalculatesItem.CalculatedName

Syntax

CalculatedName(Index: Integer): String;

Parameters

Index - index of the calculated element by the dimension.

Description

The CalculatedName property determines a name of the calculated element, which index is passed by the Index parameter.

Example

Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1, which is used as a data source for TabSheetBox.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

OLAP: IEaxAnalyzer;

Pivot: IPivot;

Calcs: IPivotEvaluatorDimCalculates;

Calc: IPivotEvaluatorDimCalculatesItem;

i: Integer;

Begin

OLAP := UiErAnalyzer1.ErAnalyzer;

Pivot := OLAP.Pivot;

Calcs := Pivot.Evaluator.DimCalculates;

Debug.WriteLine(Calcs.Count);

For Each Calc In Calcs Do

Debug.WriteLine(Calc.Dim.Name);

Debug.Indent;

For i := 0 To Calc.Count - 1 Do

Debug.WriteLine("Name: " + Calc.CalculatedName(i));

Debug.WriteLine("Expression: " + Calc.Expression(i).AsString);

End For;

Debug.Unindent;

End For;

End Sub Button1OnClick;

After executing the example clicking the button displays dimension names in the console. A list of names and formulas, according to which the calculated elements are calculated, is displayed for each dimension.

See also:

IPivotEvaluatorDimCalculatesItem