SSRS 2008 - Sort a repeating column in a matrix report
Hi, I have a matrix report that has a repeating column group, if the column count is 1, the sort works fine, if the column repeats more than once, (eg. more than 1 group) then the sort fails. Example that works! Col1 Row1 Data1 Row2 Data2 Row3 Data3 Example that fails: Col1 Col2 Row1 Data3 Data5 Row2 Data1 Data4 Row3 Data2 Data6 Is there something I'm missing in setting the sort order or something else? Thanks!
April 6th, 2011 11:07pm

The output you have given for "example that works" and "example that fails" both look sorting correctly. (Rows are sorted as 1,2,3; First row columns sorted 3,5; second row columns sorted 1,4; third row sorted 2,6. Please note that the column grouping/sorting happens within the row, therefore for a given row the sorting takes place with whatever column groups available. However if you want to ensure the sorting is applied, please right click the group in the grouping pane, and go to group properties; under the sorting tab select the field to sort. Hope this helps. Any way, if the above does not answer your query, please provide more details specifying how you would like the sorting to be applied. Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2011 12:11am

Thanks Bilal, I didn't know it sorted the data row based first for multi columns. How can I make it sort column based? :) What I would like to do is sort all of the data based on Column1 only, regardless of what is in Column2 and onwards. Just Column1. eg. Col1 Col2 Row2 Data1 Data4 Row3 Data2 Data6 Row1 Data3 Data5 Is it possible? :)
April 7th, 2011 12:59am

Thanks Bilal, I didn't know it sorted the data row based first for multi columns. How can I make it sort column based? :) What I would like to do is sort all of the data based on Column1 only, regardless of what is in Column2 and onwards. Just Column1. eg. Col1 Col2 Row2 Data1 Data4 Row3 Data2 Data6 Row1 Data3 Data5 Is it possible? :) Hi Andrew Oliver, Thanks for your detail sample report's layout with data, We could understand your requirement completely. Actually, we could achieve this requirement by setting a sort to row group. For detail steps, please follow these: 1. Right-click RowName in Row Group Panel at the left-bottom of your screem. 2. Select Group Properties..., then move to Sorting tab. 3. Click Add button, the type in an expression =SUM(IIF(Fields!ColumnField.Value="Column1'sName",Fields!Data.Value,nothing)) 4. To order, please select Z to A 5. Click OK After top steps, I think you could sort the data by Col1. Thanks, Challen FuPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
April 11th, 2011 4:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics