Group ordering on reports

  • Thread starter Thread starter Kevin C Niven
  • Start date Start date
K

Kevin C Niven

In my database you can place a given record in AGroup, BGroup, CGroup,
etc. or you can specifically indicate [NoGroup].

My problem is that I alphabetically group reports by Group
(ascending). I want [NoGroup] last, but of course it comes first. If
I remove the square brackets, it gets ordered directly after MGroup,
which is also wrong.

How can I make it such that [NoGroup] comes as the last group, while
keeping the other groups in ascending alphabetical order?

Many thanks,
Kevin
 
You can use an expression in the sorting and grouping dialog.

I would probably have a table of Group values with a column that identifies
the order to display. If you don't want to add [noGroup] to the table, you
could sort/group on the expression:
=Nz([OrderToDisplay],99999)
Another solution would be
=IIf([GroupField]="[NoGroup]", "ZZZZ", [GroupField])
 
Kevin said:
In my database you can place a given record in AGroup, BGroup, CGroup,
etc. or you can specifically indicate [NoGroup].

My problem is that I alphabetically group reports by Group
(ascending). I want [NoGroup] last, but of course it comes first. If
I remove the square brackets, it gets ordered directly after MGroup,
which is also wrong.

How can I make it such that [NoGroup] comes as the last group, while
keeping the other groups in ascending alphabetical order?


Try sorting on an expression instead of just the field:

=IIf(thefield<>"[No Group]", thefield, "zzz" & thefield)
 
Kevin said:
In my database you can place a given record in AGroup, BGroup, CGroup,
etc. or you can specifically indicate [NoGroup].
My problem is that I alphabetically group reports by Group
(ascending).  I want [NoGroup] last, but of course it comes first.  If
I remove the square brackets, it gets ordered directly after MGroup,
which is also wrong.
How can I make it such that [NoGroup] comes as the last group, while
keeping the other groups in ascending alphabetical order?

Try sorting on an expression instead of just the field:

=IIf(thefield<>"[No Group]", thefield, "zzz" & thefield)

Thanks for the suggestion. That worked.


Kevin
 
Back
Top