cancel
Showing results for 
Search instead for 
Did you mean: 

Defining sort order using parameter fields

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.