This is one case where the powerful report writer will not cooperate, I think. You will have to make do with a small work-around programming. The following is just an idea you will have to adapt.
So, I will make following assumptions:
- You have the Program Script Source code
- And, in the program script your selection is sorted by customer/order
So, then you can try as follows:
- Define an extern field called p_count (or whatever make sense) in the program script as well as the report fields.
- In the program script, also define another field like p_prev_ordr
- Then make the count field zero or 1 according to the change of Customer and Order
* It is unlikely that the order number will be same for two different
* customers, so we can simplify as follows:
* Approximate code:
if p_prev_ordr = current_ordr
p_count = 0
p_count = 1
p_prev_ordr = current_ordr
- In the report layout, on change of order number, count this new field.