Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Total Value on a 2-band report
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01178103
Message ID:
01178659
Views:
19
>>
>>
>>Are you SUMming the variable twice? In other words, if you create a report variable and set the calculate option to SUM ... and then when you use the report variable in the Data Group Footer you also mark that as SUM .. you have now told it to SUM and already SUMmed variable which will give you way more than you want.
>
>No, I am not SUMing the value twice. I have a variable nTotAmt which is set to SUM() field/expression PO_AMOUNT (name of the field). Then in the Group Footer I display this variable. The variable correctly SUMs the value but it does it for every record, both the PO Header and PO Item.

Please look at the report variable definition again and look what the RESET AT value is. It must be set to whichever detail band you are trying to SUM. Otherwise, it will process for every record in both detail bands which is what you are explaining is happening.
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
Reply
Map
View

Click here to load this message in the networking platform