IEaxDataAreaSlice.SortTransformations

Fore Syntax

SortTransformations: IEaxDataAreaTransformations;

Fore.NET Syntax

SortTransformations: Prognoz.Platfrorm.Interop.Express.IEaxDataAreaTransformations;

Description

The SortTransformations property returns collection of data transformation formulas set on sorting.

Comments

Formula that will be determined in the transformation formula expression should return integer value. This value will be considered as the Order attribute value and according to other values set in the IPivotSortIteminterface properties, a sorting will be performed.

To enable sorting, it is necessary to set the Pivot.Sorter.Enable and SortItem.UseTransformationValues property to True.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier containing table. In the table formulas for calculated elements, for sorting, for filtering must be set up.

Add links to the Express, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Slice: IEaxDataAreaSlice;
    TrsCalc, TrsSort, TrsFilter: IEaxDataAreaTransformations;
    i, k, m: integer;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Bind As IEaxAnalyzer;
    // Get data slice
    Slice := Express.DataArea.Slices.Item(0);
    // Get collection of data transformation formulas
    TrsCalc := Slice.CalcTransformations;
    TrsSort := Slice.SortTransformations;
    TrsFilter := Slice.FilterTransformations;
    // Display to the console
    For i := 0 To TrsCalc.Count - 1 Do
        Debug.WriteLine
        ("Expression set for calculated element - " + TrsCalc.Item(i).Expression.AsString);
    End For;
    For k := 0 To TrsSort.Count - 1 Do
        Debug.WriteLine
        ("Expression set on sorting - " + TrsSort.Item(k).Expression.AsString);
    End For;
    For m := 0 To TrsFilter.Count - 1 Do
        Debug.WriteLine
        ("Expression set on filtering - " + TrsFilter.Item(m).Expression.AsString);
    End For;
End Sub UserProc;

After executing the example the console displays expressions of all found formulas of data transformation.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Slice: IEaxDataAreaSlice;
    TrsCalc, TrsSort, TrsFilter: IEaxDataAreaTransformations;
    i, k, m: integer;
Begin
    // Get repository
    MB := Params.Metabase;
    // Get express report
    Express := MB.ItemById["EXPRESS"].Bind() As IEaxAnalyzer;
    // Get data slice
    Slice := Express.DataArea.Slices.Item[0];
    // Get collection of data transformation formulas
    TrsCalc := Slice.CalcTransformations;
    TrsSort := Slice.SortTransformations;
    TrsFilter := Slice.FilterTransformations;
    // Display to the console
    For i := 0 To TrsCalc.Count - 1 Do
        System.Diagnostics.Debug.WriteLine
        ("Expression set for calculated element - " + TrsCalc.Item[i].Expression.AsString);
    End For;
    For k := 0 To TrsSort.Count - 1 Do
        System.Diagnostics.Debug.WriteLine
        ("Expression set on sorting - " + TrsSort.Item[k].Expression.AsString);
    End For;
    For m := 0 To TrsFilter.Count - 1 Do
        System.Diagnostics.Debug.WriteLine
        ("Expression set on filtering - " + TrsFilter.Item[m].Expression.AsString);
    End For;
End Sub;

See also:

IEaxDataAreaSlice