4D v13.4

QR SET SORTS

Home

 
4D v13.4
QR SET SORTS

QR SET SORTS 


 

QR SET SORTS ( area ; aColumns {; aOrders} ) 
Parameter Type   Description
area  Longint in Reference of the area
aColumns  Real array in Columns
aOrders  Real array in Sort orders

The QR SET SORTS command sets 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} is 1, the sort order is ascending.
  • If aOrders{$i} is -1, the sort order is descending.

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.

 
PROPERTIES 

Product: 4D
Theme: Quick Report
Number: 752

This command modifies the Error system variable

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D 2003

 
SEE ALSO 

QR GET SORTS