IEaxDataAreaTransformation.Modifier

Syntax

Modifier(LeftOperand: IDimSelection;
        RightOperand: IDimSelection;
        Operation: PivotTransformationSelectionOperation;

Parameters

LeftOperand. Left operand.

RightOperand. Right operand.

Operation. Operation of selection modification.

Description

The Modifier method modifies dimension selection.

Comments

To check operation of selection modification, use IEaxDataAreaTransformation.TestModifier.

Example

Executing the example requires that the repository contains express report with the EXPRESS identifier.

Add links to the Dimensions, Express, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    DArea: IEaxDataArea;
    Slice: IEaxDataAreaSlice;
    SS: IDimSelectionSet;
    S: IDimSelection;
    TypeSelOp: PivotTransformationSelectionOperation;
    CalcTransformations: IEaxDataAreaTransformations;
    CalcTransformation: IEaxDataAreaTransformation;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get data source slice
    DArea := Express.DataArea;
    Slice := DArea.Slices.Item(0);
    // Get formula of data transformation in analytical area
    CalcTransformations := Slice.CalcTransformations;
    CalcTransformation := CalcTransformations.Item(0);
    // Get selection where formula is located and deselect it
    SS := CalcTransformation.Selection;
    S := SS.Item(0).CreateCopy;
    S.DeselectAll;
    S.CopyToEx(SelectionCopyToExOptions.WithGroup, ss.Item(0), True);
    // Display to the console operation type of selection transformation in the table
    TypeSelOp := CalcTransformation.ModifierOperation(SS.Item(0));
    Select Case TypeSelOp.ToString
        Case "0": Debug.WriteLine("Operation type - " + "None");
        Case "1": Debug.WriteLine("Operation type - " + "Union");
        Case "2": Debug.WriteLine("Operation type - " + "Intersection");
        Case "3": Debug.WriteLine("Operation type - " + "Difference");
        Case "4": Debug.WriteLine("Operation type - " + "Symmetric Difference");
        Case "5": Debug.WriteLine("Operation type - " + "Replace");
    End Select;
    S := CalcTransformation.ModifierRightOperand(SS.Item(0));
    CalcTransformation.Modifier(SS.Item(0), S, PivotTransformationSelectionOperation.Replace);
    CalcTransformation.TestModifier(SS.Item(0), S);
    // Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example:

See also:

IEaxDataAreaTransformation