Problem with sub-total breaks on a report
Boaz Bezborodko
boaz at mirrotek.com
Tue Apr 14 12:27:26 PDT 2009
Kenneth Brody wrote:
> Boaz Bezborodko wrote:
> [...]
>>>> 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)=""
> [...]
>> When going through the data before hitting any of the breaks cl="".
>> Once the first break point is hit it should equal '0' until given the
>> value of ch which in my sample data is "62.32". But it only shows
>> this when in the @wbrk routine. Once it starts going through the
>> data lines again cl shows up as '/d0'. When it gets to @wbrk2 again
>> it shows as "62.32" until a new ch gets added, in this case a value
>> of '248.73' and 'cl' then correctly shows a value of '311.05'. At
>> that point it hits @wbrk3 and the value shows '396.49' for no
>> particular reason that I can find. There is no '396.49' anywhere in
>> the data set I'm working with.
>
> The value of CL is based on CH, which is based on CG and CA, which are
> based on ???...
>
> Without actual examples of all the data involved, we can only guess.
> And my guess is that you are not doing what you think you are doing
> with regard to dummy fields and multiple break levels.
>
>> I did find that I could get 'cl' to hold the right data if I put it
>> in AUTO processing. But I'm trying to find out what FP is doing
>> otherwise.
>
> And that further points to my comment above about dummy fields and
> multiple break levels. You may want to check out "Output Processing:
> subtotals, dummy fields, aliases and arrays", published in SmallTalk
> 9.3 (summer '92).
>
> http://www.hvcomputer.com/download/output.txt
>
CG and CA are values that come from the TOT command. I thought that by
putting the resulting data in a global (,g) variable in the break point
I was freezing it in place. But apparently that only happens if the
variable is also in the Auto processing table.
I know that TOT can get confusing when working in the break levels which
was why I wanted to pull this out separately.
More information about the Filepro-list
mailing list