ORDER

Specifies the order of columns in a report.

Syntax

{ ORDER columnList }

columnList Numeric designations of the columns to rearrange, separated by a space between each column number.
Each column number represents the initial positions of each column (from 0 to n where n is the last column, counting names, data, and calculated columns, respectively).
The position of each number in the columnList represents the new order in which you want the columns to be displayed.

Default Value

Using the ORDER command without a columnList resets the column order to the default setting (i.e. 0, 1, 2, 3, 4, and so on).

Description

This command determines the output order for columns in the report, based on the original ordering of the columns.

Always refer to columns in any report command based on their original position, not on the output position of the column after the ORDER command.

Make sure you specify all the report columns in the ORDER command unless you use FIXCOLUMNS. ORDER simply moves the listed columns to locations in the final report but does not shift the unlisted columns to make room for the columns moved. If you have a five column report and you specify the command {ORDER 2 3 4}, you see columns 2, 3 and 4 in the report followed again by columns 3 and 4. If you really want a 3 column report, use {FIXCOLUMNS 3}.

Calculated data columns have column numbers which begin after the last regular data column. In other words, if each output data row had:

then columns 0 and 1 are the row name column numbers; 2, 3, and 4 are the regular data column numbers; and 5 and 6 are the calculated-data column members.

Notes

Example

The following example is based on the Sample Basic database.

<PAGE (Measures, Market)
Texas Sales
{ORDER 0 1 4 2 5 3 6 BLOCKHEADERS}
     <COLUMN (Scenario, Year)
     Actual Budget
     Jan Feb Mar
<ROW (Product)
<DESCENDANTS "100"
     !

This script arranges the Jan, Feb, and Mar columns side-by-side.

                                      Sales Texas 
                   Actual   Budget   Actual   Budget   Actual   Budget 
                      Jan      Jan      Feb      Feb      Mar      Mar    
                 ======== ======== ======== ======== ======== ======== 
100-10                452      560      465      580      467      580 
100-20                190      230      190      230      193      240 
100-30           #Missing #Missing #Missing #Missing #Missing #Missing

See Also

FIXCOLUMNS
NAMESCOL

©2004 Hyperion Solutions Corporation. All Rights Reserved.
http://www.hyperion.com