Avinash
Avinash

Reputation: 1313

Order by in SSRS report

My report is supposed to be ordered by completionDate in ascending order. I can get the order in my T-SQL query but when I populate it onto an SSRS report it doesn't seem to carry the order. I'm using SQL Server 2008. and the date is in Varchar. Any help will be highly appreciated.

Avinash.

Upvotes: 9

Views: 25911

Answers (3)

Irf
Irf

Reputation: 4607

You can also delete the sorting which is automatically created for you when you do grouping and then you'll get the same Order as you get when you execute the Query

becasuse you already got one sorting in the Query , so no need to sort it over again in the report

There is nice post over here regarding grouping which mentions this deleting

Your Question helped, but then I went for Deleting option which is working fine for me

Upvotes: 2

Avinash
Avinash

Reputation: 1313

Thanks to Nathan I got a fix. I changed the sorting property within the milestones Group to CompletionDate and it seems to be working fine now.. earlier the group was sorted by Milestones.. Just had to change it to completionDate..

Upvotes: 3

Nathan DeWitt
Nathan DeWitt

Reputation: 6601

Go into the properties of your table (right-click, properties) and set the Sort property to be by completionDate in Ascending order. You can also Sort each group if you need to.

If you still run into problems, you can sort the field after it's been converted into a date:

=CDate(Fields!completionDate.Value)

Upvotes: 7

Related Questions