April 30, 2012 at 4:45 pm
Hi,
Using SSRS 2008 R2, I have a report with no groups (except Details), which sorts depending on a parameter. User clicks a placeholder in a textbox to change the sort order. The Action on the placeholder runs the report again and passes the @SortOrder in.
The tablix being sorted checks the existing value of the parameter, and sets the sort accordingly. This works well. My problem comes from wanting to change the sort direction (asc, desc) - cannot seem to do this.
The sort expression is in this format: IIf(Parameters!SortOrder.Value = "Alpha", Fields!AlphaField.Value, Fields!NumericField.Value).
That sorts in A-Z (ascending) order. Is there any way to dynamically change it to sorting Z-A (descending)?
Since the tablix is not always sorted this way, I cannot simply set the sort direction at the dataset level - I need to be able to change it depending on how the user is viewing the report.
Many thanks.
May 1, 2012 at 7:13 am
I am not sure it applies exactly in your case, but I wrote a blog about changing the default sort from ASC to DESC for interactive sort. Maybe it will give you some ideas.
http://www.bidn.com/blogs/Daniel/ssas/1820/ssrs-change-the-interactive-sort-default-to-descending
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply