SSRS ignores sort in a recursive hierarchy

老子叫甜甜 提交于 2019-12-12 03:07:44

问题


I've got a SSRS report that builds a recursive hierarchy using the Recursive Parent property. I need to sort by a field in the dataset (not interactive sorting, just plain sorting). I've set it on the Details group but Reporting Services won't do the sort.

If I remove the recursive grouping and return it to a flat dataset, the sort works as expected, so I know it is because of the hierarchy. Anyone else ever run into this?


回答1:


Sorting within a recursive hierarchy will only affect the order of items at the same level, within the same node.

So, for example, if Peter is the manager of Fred and Sid, then sorting ascending on name will produce the output:

Peter
Fred
Sid

While sorting descending on name will produce the output:

Peter
Sid
Fred

Under these circumstances, Peter can never appear between Fred and Sid because he is at a higher level within the hierarchy.



来源:https://stackoverflow.com/questions/9284396/ssrs-ignores-sort-in-a-recursive-hierarchy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!