Skip to Content
author's profile photo Former Member
Former Member

Defining sort order using parameter fields

Post Author: vandersee

CA Forum: General

I've created a report, the contents of which is sorted depending on a parameter selected (method used is as described in the help topic entitled "Defining sort order using parameter fields". Is it possible to vary the Sort Direction (ascending/descending) using parameters also, so that if I choose to sort by field A it will be ascending, but descending if I choose to sort by field B?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 06:37 PM

    Post Author: V361

    CA Forum: General

    You can create a Parameter {?Sort Order} make it a string, and add items A to Z and Z to A and a formula and sort the group using the formula.

    Group Expert, select the group, select options, check use a formula as group sort order

    if {?Sort Order} = "A to Z" then crAscendingOrder else crDescendingOrder

    And your group will sort based on what is selected in the parameter.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 05, 2008 at 07:26 AM

    Post Author: vandersee

    CA Forum: General

    I'm using version 8.5 and it doesn't seem to have the functions crAscendingOrder and crDescendingOrder. Are these only available in later versions?

    If that's the case, is there some way of getting the result I want from 8.5?

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 05, 2008 at 07:08 PM

    Post Author: V361

    CA Forum: General

    Sorry, not familiar with 8.5 also not sure when the CR-Ascending appeared, I know for certain it is in 11.5, but there have also been a huge number of changes since 8.5 so unless you have to upgrade I would put it off. ( or you may end up re-writing a bunch of reports)

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.