Steve Novoselac has done an outstanding job of explaining how to set up your SSRS reports so your users can dynamically sort their reports. This reference document was very easy to follow and within minutes I was able to achieve the results as described.
The other day, someone requested that a report in SSRS be sorted differently by default. While that might make sense if everyone wants it that way, more than likely you might have people that want a report sorted differently by default. How to do it?
There are probably a few ways, but this is what I did.
First, I added two parameters. “SortByDefault” and “SortOrder”
The “SortByDefault” will be a drop down of your columns you want to sort by for your dataset (or group, or table/tablix)
The “SortOrder” is simply Asc (1 to N, A to Z) and Desc (N to 1, Z to A)
Now, here is how mine look:
SortByDefault (I have two columns I want to allow sorting by, PointsLeft and StackRank):
Now comes the fun stuff: Making it work.
Make sure you remove any “ORDER BY” in your dataset (you don’t have to but…
View original post 319 more words