How do you sort rows in a cross tab report?
I have a dataset with columns Name, Gender, KS2 Band, KS2 APS, OtherSubjectCode and OtherGrade.
It is sorted by Name and then KS2APS. All fields are strings.
My cross tab has Name, Gender, KS2 Band, KS2 APS on each row,
OtherSubjectCode as the cross columns,
OtherGrade as the cross cell.
I am able to sort the name ascending or descending by changing the drop down in the designer. (see left hand picture)
However, if I set Name to 'No sort' and instead set KS2 APS, or any other field, to 'Ascending A-Z' (see middle picture) then I seem to get a completely random order of rows, not sorted by KS2 APS or name (see picture on right)
I've tried changing the sort order in the dataset to match that in the designer but it still makes no difference.
I've tried setting all of them to 'no sort' and sorting the dataset the way I want but it still makes no difference.
The only way I can make it work is to move the KS2 APS to the first column as it seems this is the only column that obeys the sort order in the designer.
How can I sort by a different column?
It is sorted by Name and then KS2APS. All fields are strings.
My cross tab has Name, Gender, KS2 Band, KS2 APS on each row,
OtherSubjectCode as the cross columns,
OtherGrade as the cross cell.
I am able to sort the name ascending or descending by changing the drop down in the designer. (see left hand picture)
However, if I set Name to 'No sort' and instead set KS2 APS, or any other field, to 'Ascending A-Z' (see middle picture) then I seem to get a completely random order of rows, not sorted by KS2 APS or name (see picture on right)
I've tried changing the sort order in the dataset to match that in the designer but it still makes no difference.
I've tried setting all of them to 'no sort' and sorting the dataset the way I want but it still makes no difference.
The only way I can make it work is to move the KS2 APS to the first column as it seems this is the only column that obeys the sort order in the designer.
How can I sort by a different column?
Comments
I did wonder if it was a bug of some sort. Its taken me nearly two days to re-write all the sql and re-design my linked datasets just so I can simulate sorting by a different column.
So, you should use MasterData band for your task (different sort order) Did you use your login/password for your personal download page?
I think so. When I go to the main page of Fastreports I log in with a user name and password to get to the forum and post comments. I can also see all my controls.
Its only when I go to 'support' and then 'online support form,' (which is where I think I am supposed to raise tickets) that I get asked to log in again , under a heading of 'Authorization'. Thats where my user name/password is not recognised. I'm sure I registed a long time ago
(Thanks for the info about the sorting. In the end I fiddled around with clientdataset.addIndex and clientdataset.IndexName and got it to work that way, with the crosstab having no sorts set )