Hi ,
In my list report i have 4 colums like Column1,Column2,Column3,Column4.
& In my Value prompt i had added the 4 column names as satic choice,
When im selecting the Colum1 in value prompt,it sould be sorted descending ,like that i should able to sort the 4 colums,
i Want to achieve this without using JavaScript can anyone please help me with the expression code..
Cheers,
Ram
You could try this:
- Set the sort on your list to column1 descending
- Copy the list and paste it on the page three times so you have four lists
- Change the sort on the second list to column2; third list to column3; etc.
- Create four boolean variables such as sortColumnA with expression ?promptchoice? = 'ColumnA' ; sortColumnB with expression ?promptchoice? = 'ColumnB' ; etc
- Apply the appropriate variable as a render variable for each list
When the report runs only one of the lists will render depending on the user's selection.
Another way:
Create a field in the query called SortKey. The expression should be:
#sb(prompt('promptchoice','token'))#
Sort your list by that field.
Make Column1 the default value for the prompt.
When the report runs SortKey will resolve to [Column1], and the list will sort based on that. When the user selects another field, Column2 for instance, the macro will resolve to [Column2].
Quote from: PaulM on 24 Feb 2011 08:58:22 AM
Another way:
Create a field in the query called SortKey. The expression should be:
#sb(prompt('promptchoice','token'))#
Sort your list by that field.
Make Column1 the default value for the prompt.
When the report runs SortKey will resolve to [Column1], and the list will sort based on that. When the user selects another field, Column2 for instance, the macro will resolve to [Column2].
SOOOO much better!!
Amazing ..
Thanks for your reply guys ..
Regards,
Ram