SORTDESC
The SORTDESC Report Writer command for Essbase specifies a descending, hierarchical sort order to be used for member commands.
Syntax
<SORTDESC
Notes
SORTDESC determines the order in which items are sorted in member commands in the report specification. Use this command prior to the other sort commands, including SORTALTNAMES, SORTGEN, SORTLEVEL and SORTMBRNAMES. With the SORTDESC command, all members are sorted in descending order starting with either the letter "z" or the highest generation and moving toward the letter "a" or the lowest generation.
SORTDESC must precede the selection commands; for example, CHILDREN or DESCENDANTS. If no sorting commands are used, members are output in hierarchical order based on the member outline. Any sort command remains in effect until another sort command is issued.
Example
The following report script example is based on Sample Basic.
<PAGE (Market, Measures)
Massachusetts Sales
<COLUMN (Scenario, Year)
Actual Budget
Jan Feb Mar
<ROW (Product)
<SORTDESC
<ICHILDREN Product
!
The above example produces the following report:
Massachusetts Sales
Actual Budget
Jan Feb Mar Jan Feb Mar
======== ======== ======== ======== ======== ========
Product 1,251 1,206 1,203 1,170 1,130 1,120
Diet #Missing #Missing #Missing #Missing #Missing #Missing
400 160 136 132 160 140 130
300 130 132 129 100 100 100
200 467 468 450 450 450 430
100 494 470 492 460 440 460