Problem with sub-total breaks on a report

Boaz Bezborodko boaz at mirrotek.com
Tue Apr 14 08:48:31 PDT 2009


I have a report that totals up sales and deductions on payments and then 
uses this to generate a commission percentage to apply to the invoice 
amounts generating a commission amount per customer during @wbrk2. I 
then have to total those up to get a total commission amount for each 
sales rep in @wbrk3. (@wbrk1 is on a sub-level for individual customer 
checks.)

I use a global variable 'cl(12,,2,g)' that gets set to zero for each new 
sales rep. In the customer sub-totals I add the commission amount to cl. 
When I step through the debugger cl is correct on the customer 
sub-total, but when I look at it on the sales rep sub-total break the 
amount is not the same and I can't figure out where it came from.

(During the data lines cl shows up as '/d0')

In @wbrk2 I have
? If:
Then: ch(10,,2)=cg*ca/"100" ; cl=cl+ch
The very first line of code checks if it is on a new sales rep and, if 
so, sets cl(12,,2,g)=""

What am I missing?


More information about the Filepro-list mailing list