Syntax for sorting options

The rv_sort_options parameter is used to sort data within the worksheets. You can sort dimensions in ascending or descending order and specify whether the hierarchy structure is maintained. An XML table is used to define the dimensions and the sorting order. Each dimension to sort is defined in a row in the xml with the dimension name specified as a letter. These are the available dimensions:

  • I (Item)
  • L (Location)
  • P (Period)
  • S (Scenario)
  • H (Historical Cycle Periods)
Note: You cannot sort measure dimensions.

Each property is defined as a name and a value pair. These are the available properties:

SortOn
Indicates whether the dimensions are sorted. Possible values:
  • True: The dimensions are sorted.
  • False: The dimensions are not sorted.
    Note: If not specified, the dimensions are not sorted.
Attribute
Indicates the attribute of the dimension to which sorting is applied.
  • To sort the dimensions by name, set the Attribute property value to Name.
  • To sort the dimensions by another attribute, prefix the attribute with ATT1_. For example, set this option value to ATT1_description, to sort the dimensions by description.
Note: If no attribute is specified, the description is sorted.
Hierarchized
Indicates whether the hierarchy structure is maintained. Possible values:
  • True: The hierarchy structure is maintained, and the dimensions are displayed indented.
  • False: The hierarchy structure is not maintained, and the dimensions are displayed in a flat list, regardless of the hierarchy placement.
Note: If the SortOn and the Hierarchized properties are set to False, the data is displayed in a flat list and sorting is not applied.
Sorttype
Indicates the type of sorting applied. Possible values:
  • ASC (Ascending): The dimensions are sorted in ascending order.
  • DESC (Descending): The dimensions are sorted in descending order.
Note: 
  • If the Hierarchized property is set to True, the data is ordered within the hierarchy structure.
  • If the Hierarchized property is set to False, the data is ordered in a flat list, regardless of the hierarchy structure.

These are the examples based on the Item hierarchy structured as follows:

  • All Items
    • Caribbean
      • A
      • C
    • Indian
      • B
      • D

Example-1: This examples shows sorting by Item Name in a descending order and maintaining the hierarchy structure.

<Table>
<Row name="i">
<Property name="attribute" value="Name" /> <Property name="hierarchized" value="TRUE" />
<Property name="sorttype" value="DESC"  />
<Property name="SortOn" value="TRUE" />
</Row>
</Table>
  • All Items
    • Indian
      • D
      • B
    • Caribbean
      • C
      • A

Example-2: This example shows sorting by Item Name in a descending order without the hierarchy structure.

<Table>
<Row name="i">
<Property name="attribute" value="Name" /> <Property name="hierarchized" value="FALSE" />
<Property name="sorttype" value="DESC"  />
<Property name="SortOn" value="TRUE" />
</Row>
</Table>
  • Indian
  • D
  • Caribbean
  • C
  • B
  • All Items
  • A