I'm writing up a report using SQL Server Reporting Service via Visual Studio 2008. I have a stored procedure on a SQL Server database that returns a list in which I need the entry with value "
F" in colulmn
[Column] to be always on top, as such:
F A B C D E G H
The order of the others does not matter, so I accomplished this feat with the following in-query clause:
ORDER BY CASE [Column] WHEN 'F' THEN 0 ELSE 1 END
The stored procedure returns with the proper sort if I play it in SQL Server Management Studio, and it also works properly when I call it from the Report Data Query Designer window.
HOWEVER... when I go to preview the report, the elements are re-sorted alphabetically in the matrix in which they are contained, so that "
A" is on top and "
F" is in between "
E" and "
A B C D E F G
I found this problem, but on inspection the matrix contains no sorting options. I think it might have at one point, in which case maybe something is not refreshing properly (though the stored procedure has been altered to return different data and the new entries appeared successfully, so I don't think that's it).
Any ideas for what I can try? Many thanks in advance!