Complex Sorting

  • Thread starter Thread starter cna48
  • Start date Start date
C

cna48

I have a report of our manufacturing schedule. I have two columns I need to
sort by. There is a [Prod Date] column and a [Ship Date]. I need the
schedule to be sorted so that any rows that have a [Ship Date] < Now()+21 are
sorted by [Ship Date] and any that have a [Ship Date]> Now()+21 are then
sorted by [Prod Date].
 
hi,
I have a report of our manufacturing schedule. I have two columns I need to
sort by. There is a [Prod Date] column and a [Ship Date]. I need the
schedule to be sorted so that any rows that have a [Ship Date] < Now()+21 are
sorted by [Ship Date] and any that have a [Ship Date]> Now()+21 are then
sorted by [Prod Date].
You need a calculated sorting column:

SortingColumn:
Iif([Ship Date] < Now() + 21, [Ship Date], [Prod Date])

And sort by that column.

Caveat:
Your description has a hole, what do you like do to when

[Ship Date] = Now() + 21

?

btw, you should consider using field names without special characters.


mfG
--> stefan <--
 
cna48 said:
I have a report of our manufacturing schedule. I have two columns I need to
sort by. There is a [Prod Date] column and a [Ship Date]. I need the
schedule to be sorted so that any rows that have a [Ship Date] < Now()+21 are
sorted by [Ship Date] and any that have a [Ship Date]> Now()+21 are then
sorted by [Prod Date].


Set the report's Sorting and Grouping Field/Expression to an
expression like:
=IIf([Ship Date] < Date()+21, [Ship Date], [Prod Date])
 
Back
Top