Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing Invoice Flag

Status
Not open for further replies.

Peager

Programmer
May 27, 2003
140
US
Is there a way to flag a missing number in a detail listing? I thought I had seen one once but can't lay my hands on it.

Thanks in advance.

Paul
 
Assuming numbers are consecutive, and you are trying to identify missing numbers, then you could use a formula like:

if not onfirstrecord and
{table.number} <> previous({table.number}) + 1 then
totext({Orders.Customer ID},0,"")+"*" else
totext({Orders.Customer ID},0,"")

...where the "*" identifies a gap in the sequence.

-LB
 
That's what I was trying to remember previous(...).

Thanks a bunch for the instant repsonse....

Paul
 
Here is one way.

Assumptions:
1)You have a numeric field holding the invoice number.
2) You have sorted the data on the invoice number. It is in the last sort position.
3) You have selected your records in some way, by date or number.

Place the invoice number field and any other fields that you want in the detail section. Create a formula with the following code:

whileprintingrecords;
if onfirstrecord then "" else
if {table.invoice} <> Previous({table.invoice})+1 then "Missing Inovice Before This One!" else ""

Place this in the detail section.
Adjust the stuff in the quotes to your taste.

Howard Hammerman,
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
howard@hammerman.com
800-783-2269
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top