IEaxDataAreaPivotSlice.ExternalTransformations

Syntax

ExternalTransformations: IEaxDataAreaExternalTransformations;

Description

The ExternalTransformations property returns the collection of modeling problems that are used to transform data in a data slice.

Comments

When working with a modeling problem, the data matrix calculation result should be sent directly to the analytical data area. To do this, use the IEaxGrid.FillTabSheet property that is set to False.

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier containing a modeling problem with the PROBLEM identifier. There also must be a data entry form. A table area is added in the data entry form. A modeling container and a table area are built on a common data source.

The below specified macro is assigned as an executable method for a custom button of a data entry form.

Add links to the Express, Metabase, and Report system assemblies. Add links to the assemblies required for working with data entry forms.

Public Sub AddTransform(Report: IPrxReport);
Var
    Mb: IMetabase;
    Slice: IEaxDataAreaPivotSlice;
    ETs: IEaxDataAreaExternalTransformations;
    ET: IEaxDataAreaExternalTransformation;
    Grid: IEaxGrid;
    Desc: IMetabaseObjectDescriptor;
Begin
    Mb := MetabaseClass.Active;
    Slice := Report.DataArea.Slices.Item(0As IEaxDataAreaPivotSlice;
    Grid := Report.DataArea.Views.Item(0As IEaxGrid;
    Grid.FillTabSheet := False;
    // Modeling problems
    ETs := Slice.ExternalTransformations;
    ETs.Clear;
    ET := ETs.Add;
    // Search for problem in repository
    Desc := Mb.ItemByIdNamespace("PROBLEM", Mb.GetObjectKeyById("CONT_MODEL"));
    If Desc = Null Then
        Debug.WriteLine("Problem not found");
        Return;
    End If;
    // Set problem to work with a data slice
    ET.Problem := Desc.EditTemporary;
    ET.Enabled := True;
    Debug.WriteLine("Problem added");
End Sub AddTransform;

When a macro is executed, a modeling problem that can be used to transform data is added for a table area.

See also:

IEaxDataAreaPivotSlice