I have a collection of sort fields and I want to dynamically sort by a specific field....
Sounds easy right?
i have 21 sort fields in all. (and 4 groupings)
So for example I want to sort by the field at index 10. You would think that:
Me.ctlReportDocument.DataDefinition.SortFields(10).SortDirection = SortDirection.AscendingOrder
would do it but it doesn't. I think that as well as sorting index 10 it sorts all the other fields as well hense overwriting the result that sorting on field 10 had.
So is there a way of telling it only to sort on a specific index and to ignore all the other sortfields?
How does it work, does it sort index 0 then index 1 etc... when you call ctlReportViewer.RefreshReport()?