Problem with sub-total breaks on a report

Kenneth Brody kenbrody at spamcop.net
Tue Apr 14 17:11:34 PDT 2009


Boaz Bezborodko wrote:
[...]
> CG and CA are values that come from the TOT command.

Which only partially answers my question about how they are calculated. 
What are they the TOT() of?  (I cringe at the syntax of that sentence. 
Please don't take me to task over it.)

 > 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.

Putting the ",g" attribute means that they won't be cleared between records, 
and this holds regardless of where they are declared.

The difference here is that a dummy field declared in automatic processing 
won't have multiple break-level copies, whereas one declared in output 
processing will.  The SmallTalk article I mentioned eariler goes into this 
in much greater detail.

     http://www.hvcomputer.com/download/output.txt

So, CL, CH, CG, and CA all have multiple copies for the multiple break 
levels.  (Until, that is, you moved CL into automatic processing, at which 
point it lost that property.)  Because CG and CA have multiple break-level 
copies, they hold the TOT() for that break level.  The @WBRK2 copies can 
have different values than the @WBRK3 copies, which would, in turn, cause 
different values for CH, which in turn cause different values for CL.

That is why a simple "CG and CA are values that come from the TOT command" 
answer doesn't suffice here.

> I know that TOT can get confusing when working in the break levels which 
> was why I wanted to pull this out separately.

Read the above article and see if you are still confused.

-- 
Kenneth Brody



More information about the Filepro-list mailing list