on 09-12-2014 12:50 PM
Hi,
How can I define sorting sequence based on parameter selection in a prompt panel such that records gets sorted in that order ?
Also can I sort the data in individual parameter prompt for selection?
Thanks,
Karan Sheth
Hi Karan,
Let's assume you're trying to dynamically set the sort direction for a string field (Name) using a prompt. Here's what you need to do:
1) Create a formula called Sort1 with this code:
If {?Sort_prompt} = 'Ascending' then '!'
else {Database_Name_Field}
2) Create a formula called Sort2 with this code:
If {?Sort_prompt} = 'Descending' then '!'
else {Database_Name_Field}
3) Go to Record Sort Expert > Add the first formula field > Choose 'Descending' as the 'Sort Direction'.
Next, add the second formula to the list and this time choose 'Ascending' as the 'Sort Direction'.
Another way to do this if you're using CR 2008 or higher is to use the Sort Control feature. To use this feature, first add the database field you wish to sort on in the Record Sort Expert > Right-click the column header on the report > Select 'Bind Sort Control' > Choose the database field from the list.
This places two arrows on the column header for changing the sort direction at runtime.
For the second question please post a new discussion with a brief description of what you're trying to achieve.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
I tried the above formula and its working, but in my Record Sort Expert i am having 5 group fields and now i added 2 more @asc and @dsc .
My sort field is Date column.
i need to move this to 2 order
Example i need like this:
In Record Sort Order:
Group 1: Name
@asc
@dsc
Group 2: Add1
Group 3: Add2
Group 4: Add3
Group 5: Order No
now its in
Group 1: Name
Group 2: Add1
Group 3: Add2
Group 4: Add3
Group 5: Order No
@asc
@dsc
can you help me how to move this column?
User | Count |
---|---|
77 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.