What is the difference between sorting at the group level vs at the program level.

1 Answer 21 Views
Grouping Sorting
Robert
Top achievements
Rank 1
Robert asked on 20 May 2021, 02:16 PM

We are using the Report Designer V 14.1.20.513. I was hoping for an explanation of sortings. Some of our reports have 10 or more groupings, and sorting doesn't always do what I expect. It seems like I need to duplicate all the group sorting into the program sorting, but I can't tell which one rules in that case. Sometimes in the groups I need to add a 2nd sort from the next group to get the report to work. Can you explain the differences between group and program level sorting.

Thank you.

  

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 25 May 2021, 11:28 AM

Hello Robert,

I am not sure if I understand what exactly you mean by "program" level sorting, perhaps you meant sorting at report level?

It is hard to pinpoint what is causing you problems without knowing the whole structure of the report but generally, the sorting on the groups sorts the group instances for the corresponding group rather than the details inside the group. Usually, this sorting is meant to be by the grouping field as this field has a unique value for each group instance. If you use another field, the First() aggregate function will be applied to the field when sorting the group instances.

To sum it up, sorting for groups controls the order of grouping data, not the detail data. Group level sorting occurs before the sorting for the report as a whole. In order to sort the details within a group, you may for example, as you already do, sort on the report level or on the level of the data item that is being used.

  • A sorting applied to a data item sets the order of the detail data thus resulting on the order of appearance of the detail rows (including the DetailSection and detail groups). As the First and Last aggregate functions depend on the order of the data they operate with, they may return different values depending on the data items’ sorting.
  • A sorting applied to a group sets the order of the members of this group thus resulting on the order of appearance of the rows/columns depending on if this is a row or column group.

For more information, please see Ordering Data.

Please let me know if you have any other questions.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grouping Sorting
Asked by
Robert
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or