Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Report on Matrix not sorting

Author  Topic 

muzzettemm
Posting Yak Master

212 Posts

Posted - 2009-10-06 : 01:10:12
HI all I have a report that need to be sorted by Catagory for hours and Last name and First name. But for some reason the last name is not sorting. I have the this is the code I am using and it works great accept for the sorting of the names. the report is in Matrix and the names are in like this dont know if this matters or not

=Fields!Student_Last_Name.Value &

"," & Fields!Student_First_Name.Value




SELECT People_tbl.[Parent ID], People_tbl.[Student Last Name], People_tbl.[Student First Name], TanfActivity_tbl.EventDate, TanfActivity_tbl.[Earned hours],
TanfActivity_tbl.[Catagory for hours], TanfActivity_tbl.[State Catagory], TanfActivity_tbl.[Services Covered], TanfActivity_tbl.[State Services Covered],
People_tbl.[Referral Date], People_tbl.ReferralStatus, People_tbl.TANF, People_tbl.Adult_Child
FROM People_tbl INNER JOIN
TanfActivity_tbl ON People_tbl.[Parent ID] = TanfActivity_tbl.[Parent ID]
WHERE (People_tbl.ReferralStatus = N'Active') AND (TanfActivity_tbl.EventDate BETWEEN @Beginning_EventDate AND @End_EventDate) AND
(TanfActivity_tbl.[Earned hours] IS NOT NULL) AND (TanfActivity_tbl.[Catagory for hours] IN (N'ITP', N'Parenting', N'Education', N'Culture',
N'Job Skills Training', N'Life Skills', N'Travel')) AND (People_tbl.TANF = N'Yes') AND (People_tbl.Adult_Child = N'Adult')
ORDER BY CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'ITP' THEN 0 ELSE 1 END,
CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Parenting' THEN 0 ELSE 1 END,
CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Job Skills Training' THEN 0 ELSE 1 END,
CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Culture' THEN 0 ELSE 1 END,
CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Education' THEN 0 ELSE 1 END,
CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Life Skills' THEN 0 ELSE 1 END,
CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Travel' THEN 0 ELSE 1 END, People_tbl.[Student Last Name], People_tbl.[Student First Name]"," & Fields!Student_First_Name.Value

yavvie
Starting Member

46 Posts

Posted - 2009-10-06 : 06:34:03
It is a known and reported issue in reporting services 2008 - only the first sort on the report tablix works, the other ones are ignored

you have to try and sort the data in the select if possible, we are all waiting for the next SP :)
Go to Top of Page
   

- Advertisement -