IPivot.SortDiapason

Syntax

SortDiapason: PivotSortDiapason;

Description

The SortDiapason property determines a mode, in which sorting in the express report table is executed.

Example

Executing the example requires a form with the button named Button1, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1, which is a data source for TabSheetBox.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    OLAP: IEaxAnalyzer;
    Pivot: IPivot;
    Sorter: IPivotSorter;
    SortItem: IPivotSortItem;
Begin
    OLAP := UiErAnalyzer1.ErAnalyzer;
    Pivot := OLAP.Pivot;
    Sorter := Pivot.Sorter;
    
//Sorting parameters
    SortItem := Sorter.Add;
    SortItem.Kind := PivotSortKind.Column;
    SortItem.IndexInHeader := 
0;
    SortItem.Direction := PivotSortDirection.Asc;
    Pivot.SortDiapason := PivotSortDiapason.Level;
    
//Update table
    Pivot.Refresh;
End Sub Button1OnClick;

Clicking the button starts ascending sorting of the first table column values. Sorting is executed by hierarchy levels within one group.

Source data Sorted data

See also:

IPivot