QR SET SORTS

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2003


QR SET SORTS (area; aColumns{; aOrders})

ParameterTypeDescription
areaLongintReference of the area
aColumnsReal arrayColumns
aOrdersReal arraySort orders

Description

The QR SET SORTS command allows you to set the sort orders for the columns in the report whose reference is passed in area.

aColumns: in this array, you need to store the column numbers of columns to which you want to assign a sort order.

aOrders: each element of this array must contain the sort orders for the matching column in the aColumns array.

If aOrders{$i} equals 1, the sort order is ascending.

If aOrders{$i} equals - 1, the sort order is descending.

Cross-table mode

In the case of cross-table mode, you cannot have more than two items in the array. You can only sort columns (1) and rows (2). The data (that are the intersection of columns and rows) cannot be sorted.

Here is the code to sort only the rows in the case of a cross-table report:

   ARRAY REAL($aColumns;1)
   $aColumns{1}:=2
   ARRAY REAL($aOrders;1)
   $aOrders{1}:=-1 `Alphabetic sort for rows
   QR SET SORTS (qr_area;$aColumns;$aOrders)

If you pass an invalid area number, the error -9850 will be generated.

See Also

QR GET SORTS.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next