Express > Express Assembly Interfaces > IEaxDataAreaSlice > IEaxDataAreaSlice.SortTransformations
SortTransformations: IEaxDataAreaTransformations;
The SortTransformations property returns the collection of data transformation formulas set on sorting.
A 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 IPivotSortItem interface properties, a sorting will be executed.
To enable sorting, one should set the Pivot, Sorter, Enable and SortItem, UseTransformationValues properties to True.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing a 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 the collection of data transformation formulas
TrsCalc := Slice.CalcTransformations;
TrsSort := Slice.SortTransformations;
TrsFilter := Slice.FilterTransformations;
// Display in the console window
For i := 0 To TrsCalc.Count - 1 Do
Debug.WriteLine
("Expression that is set for calculated element - " + TrsCalc.Item(i).Expression.AsString);
End For;
For k := 0 To TrsSort.Count - 1 Do
Debug.WriteLine
("Expression that is set on sorting - " + TrsSort.Item(k).Expression.AsString);
End For;
For m := 0 To TrsFilter.Count - 1 Do
Debug.WriteLine
("Expression that is set on filtering - " + TrsFilter.Item(m).Expression.AsString);
End For;
End Sub UserProc;
After executing the example the console displays expressions of all found data transformation formulas.
See also: