IEaxDataAreaTransformations.ArrangeTransformation

Syntax

ArrangeTransformation(Value: IEaxDataAreaTransformation);

Parameters

Value. Data transformation formula.

Description

The ArrangeTransformation method determines a place of the specified transformation formula in calculation chain according to its dependences.

Comments

On determining a place in the calculation chain the method uses the same algorithm and the same criteria as the IEaxDataAreaTransformations.Arrange method. The difference is that method is executed only for one specified transformation formula.

To automatically arrange all transformation formulas in the calculation chain, use the IEaxDataAreaTransformations.Arrange method.

Example

Executing the example requires that the repository contains express report with the EXPRESS identifier. In the row dimension create two calculated elements with the following names: Calculated_1, Calculated_2. Arbitrary formulas are set for calculated elements. This dimension is built basing on the dictionary which is not calendar.

Connect the Express, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    DArea: IEaxDataArea;
    Slice: IEaxDataAreaSlice;
    CalcTrs: IEaxDataAreaTransformations;
    CalcTr: IEaxDataAreaTransformation;
Begin
    //Get repository
    MB := MetabaseClass.Active;
    //Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    //Analytical data area slice
    DArea := Express.DataArea;
    Slice := DArea.Slices.Item(0);
    //Data transformation formulas in analytical area
    CalcTrs := Slice.CalcTransformations;
    //Get transformation formula and change its expression
    CalcTr := CalcTrs.Item(0);
    Debug.WriteLine("Index in calculation chain before automatic arrangement: " + CalcTrs.IndexOf(CalcTr).ToString);
    //Change formula
    CalcTr.Expression.AsString := "{Calculated_2[t]}";
    //Automatic arrangement of calculation chain
    CalcTrs.ArrangeTransformation(CalcTr);
    Debug.WriteLine("Index in calculation chain after automatic arrangement: " + CalcTrs.IndexOf(CalcTr).ToString);
End Sub UserProc;

On executing the example transformation formula will be modified for the first calculated element - a new formula will get the value of the second calculated element. Calling the ArrangeTransformation method enables the user to rebuild the whole calculation chain taking into account obtained dependency. Transformation formula indexes in the calculation chain before and after changing the expression are displayed in the development environment console.

See also:

IEaxDataAreaTransformations