Sort groups by values in the header lines


Can we sort groups by one of the values of it heading line ?
I want to sort the header rows (and lines in it). Not just sort the rows inside the group.
Thanks a lot.

When grouping is done, a sort is first applied before the grouping is done, so this is how the sort order of the groups itself is set. After this grouping, the sorting cannot be changed.