SortDirection(IndexInHeader: Integer): PivotSortDirection;
IndexInHeader is an element index of a (column, row) header, according to which the sorting is needed to be set.
The SortDirection property determines sorting direction according to 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 the TabSheetBox component.
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 this example, clicking the button sets an ascending sorting of values of the first table column.
See also: