I set up a counter to count the number of invoices a customer generated during a period of time.
//@Counter of Customer Invoices
invcounter := invcounter +1;
//@Counter of Customer Number
counter := counter +1;
This counter works...However I need to reset the counter of the customer invoices when the next new customer comes up (I am using grouping on the customer number and Customer invoice. This is so I can determine that the invoice number changes I can compare data from the previous invoice for a specific product to see if selling that product(sample) produced new sales.
How do I reset the counter back to "0" if the customer number changes?
In summary I am trying to see if a sample product sold yesterday produced a new sale of that type of product today.