Identifying last 'order Number'

Printed From: Crystal Reports Book — Forum Name: Technical Questions

I have a table with (amongst other data) a field of dated order numbers for each of several sales team members. Before we load this data into the finance system each day we need to check that the first order number of the day for each member of the sales team follows on from his last order number of the previous day (i.e. last order number +1) or from the last day he worked which may be a number of days/weeks ago.

How do I, for example on the 18/11/16, check that the first order number on 18/11/16 for each salesperson = the last order number +1 for that salesperson when I don't know how many days ago that 'last order' was?

Thanks
Peter
The only thing I can think of is to group by sale member, sort by order number then have a formula in the group footer that would look something like this.

if {ordernumber} - previous({ordernumber}) = 1 then 'good' else 'not so good'