Show TOC

Function documentationSorting Range Locate this document in the navigation structure

 

The KeyRange of an EVDRE function contains an optional range called SortRange, which points to a range of cells to define how the system sorts the rows of the report.

Features

When you use the SortRange option, note the following:

  • The range must be 4 columns and 4 rows.

  • The first column must contain the name of the sorting parameter and the remaining 3 columns define up to 3 possible sorting methods.

  • The first parameter (column) may contain the following:

    • A column identifier (for example J), indicating the column on which the sorting must be based

    • A {dimension}.{property} identifier (for example ENTITY.CURRENCY) indicating that the rows must be sorted according to the alphabetical order of the value of some property of a given dimension

  • The second parameter (order) specifies the sorting order. You can use D (for Descending) or A (for Ascending). Leave it blank to default to ascending order.

  • You can use the third and fourth parameters (BeforeRange and AfterRange) to define a range of cells that should be inserted in the report above (BeforeRange) or below (AfterRange) each change of value in the sorting criteria. In the definition of the AfterRange, you can use the keyword KEY, which returns the value of the sorting element (the currency) for which a break total is being inserted.

    You can also use the EvSUB keyword in the data cell to create subtotals by currency. See EvSUM and EvSUB.

    Note Note

    You can sort on the currency of entities without retrieving the value of the currency property in the sheet.

    The system performs the sorting action after it refreshes the data, even if NO EXPANSION has been performed. If BeforeRange or AfterRange is defined on the sorting criteria, these ranges are automatically removed from the report and reapplied to its content after the data is refreshed. This also happens if NO EXPANSION is triggered.

    End of the note.