SortDirection(IndexInHeader: Integer): PivotSortDirection;
IndexInHeader - element index of a column or row header, according to which sorting must be set.
The SortDirection property determines sorting direction according to the specified element of the table header.
Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1, which is used as a data source for TabSheetBox.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
OLAP: IEaxAnalyzer;
Pivot: IPivot;
Sorter: IPivotSorter;
SortDate: IPivotSorterData;
Begin
OLAP := UiErAnalyzer1.ErAnalyzer;
Pivot := OLAP.Pivot;
Sorter := Pivot.Sorter;
SortDate := Sorter.ColumnsDataSort;
SortDate.SortDirection(0) := PivotSortDirection.Asc;
End Sub Button1OnClick;
After executing the example clicking the button sets an ascending sorting for values of the first table column.
See also: