IPivotEvaluatorDimCalculatesItem.CalculatedName

Syntax

CalculatedName(Index: Integer): String;

Options

Index is an index of the calculated element by the dimension.

Description

The CalculatedName property determines a name of the calculated element, index of which 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 that is a data source for the TabSheetBox component.

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 this example, clicking the button displays dimension names in console. A list of names and formulas, according to which the calculated elements are calculated, is displayed for each dimension.

See also:

IPivotEvaluatorDimCalculatesItem