David,
Here's what I did. Create a report, in it place a field and then a second one the is below and to the right of the first. I created two variables in the command window, lcLastCust (last customer ID) and llNewCust (T/F is this a new customer).
I wrote the following UDF;
lcRet = lcLastCust
IF Cust_id = lcLastCust
llNewCust = .F.
ELSE
llNewCust = .F.
ENDIF
lcLastCust = Customer.cust_id
RETURN lcRet
The expression for the second field is ChkLastCust(). In teh example above the UDF returns the name of the current customer.
If you run the report you will see the current customer's ID with the ID of the previous customer to the right of it.