Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to sum header field?
Message
 
To
27/05/2006 00:57:06
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01125187
Message ID:
01125829
Views:
10
This message has been marked as the solution to the initial question of the thread.
Put it in the On Exit Expression of the Group Footer. If you use the Header and it reprints when it overflows to a new page, you'll get the wrong total.

Double check that the Value to Store is zero and NOT your tax field. Also, double check that you don't have an On Entry or On Exit expression in the Detail band that is messing with the report variable.




>Hi Cathy,
>
>This is what I did:
>
>- created a report var named nTAXTOT
>- set Value To Store to ZERO (0)
>- set Initial Value to ZERO (0)
>- set the Calculate to SUM
>- then, I put the following in On Exit Expression of the Group HEADER:
> _VFP.SetVar('nTAXTOT', nTAXTOT + Invh.Tax)
>
>It still resulted in SUMming the Tax values for every occurrence of the child table!
>
>I moved the '_VFP.SetVar...' expression to On Entry instead - still the same.
>
>I made an error in my thread: THIS IS ON VFP 6, NOT VFP 9... could this an issue?
>
>Anything I could have done wrong?
>
>Thanks
>Dennis
>
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform