sorting addresses by odd and even numbers

K

Klonis Borg

I have a report that displays addresses. Both streetnumbers and streetnames
are in separate fields. I am already able to group the list by streets, but
I wish to sort the addresses by odd and then even numbers keeping them
grouped by street.

How do I do this? Please help.

Thanks,
Jonathan
 
F

fredg

I have a report that displays addresses. Both streetnumbers and streetnames
are in separate fields. I am already able to group the list by streets, but
I wish to sort the addresses by odd and then even numbers keeping them
grouped by street.

How do I do this? Please help.

Thanks,
Jonathan

Create a query as the Report's record source. Include all of the
fields needed in the report.
Add one more column.
SortThis:[StreetNumberField] Mod 2 = 0

In the report, set the Report's Sorting and Grouping dialog to
SortThis as the first item, sorted Ascending (to show even numbers
first) or Descending (to show odd numbers first).

Then under the SortThis row, enter the StreetNumber field sort
Ascending

The Street Numbers will be sorted ascending, evens (or odds if
Descendig was selected above) first.
 
M

Marshall Barton

Klonis said:
I have a report that displays addresses. Both streetnumbers and streetnames
are in separate fields. I am already able to group the list by streets, but
I wish to sort the addresses by odd and then even numbers keeping them
grouped by street.


After the group for street, add a sort/group on the
expression =streetnumber Mod 2 with sort order descending.
Then add a sort level on just the streetnumber field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top