SORTALTNAMES

Alphabetically sorts members by their alternate names within a member selection command (for example, <CHILDREN).

Syntax

<SORTALTNAMES

Notes

This command sorts alphabetically all members added with a member command (for example, <CHILDREN) by their alternate name. Members entered directly in the report specification without a member command, calculated rows and column names, or member commands encountered in the specification prior to the SORTALTNAMES command, are not affected by the command.

This command 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 is designed for the Demo Basic cube, available in the gallery.

The command <SORTALTNAMES sorts the members added to the report with the <IDESCENDANTS Product command by the alternate name of each member. The command {OUTALTNAMES} causes alternate member names to be displayed in the report. {NOINDENTGEN} turns off hierarchical indenting so the row names line up. Indented row names are not particularly useful when the output is sorted on any criteria other than generation.

<PAGE (Market, Accounts, Scenario)
Chicago Sales Actual
      <COLUMN (Year)
      <CHILDREN Year
<ROW (Product)
<IDESCENDANTS Product
{NOINDENTGEN}
     !

<PAGE (Market, Accounts, Scenario)
Chicago Sales Actual
{OUTALTNAMES}
      <COLUMN (Year)
      <CHILDREN Year
<ROW (Product)
<SORTALTNAMES
{NOINDENTGEN}
<IDESCENDANTS Product
     !

This produces the following reports:


                         Chicago Sales Actual 

                     Qtr1     Qtr2     Qtr3     Qtr4 
                 ======== ======== ======== ======== 

Stereo              2,591    2,476    2,567    3,035 
Compact_Disc        3,150    3,021    3,032    3,974 
  Audio             5,741    5,497    5,599    7,009 
Television          4,410    4,001    4,934    6,261 
VCR                 3,879    3,579    4,276    4,877 
Camera              2,506    2,522    2,602    3,227 
  Visual           10,795   10,102   11,812   14,365 
    Product        16,536   15,599   17,411   21,374 

                         Chicago Sales Actual 

                       Q1       Q2       Q3       Q4 
                 ======== ======== ======== ======== 

Audio               5,741    5,497    5,599    7,009 
Camera              2,506    2,522    2,602    3,227 
Compact_Disc        3,150    3,021    3,032    3,974 
Product            16,536   15,599   17,411   21,374 
Stereo              2,591    2,476    2,567    3,035 
Television          4,410    4,001    4,934    6,261 
VCR                 3,879    3,579    4,276    4,877 
Visual             10,795   10,102   11,812   14,365