Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Summary
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00885323
Message ID:
00886165
Views:
16
You can do a slight twist to this solution. Create one variable, rnTotal, set the value to 0, set it to SUM, reset at end of report.

Next, in the OnExit expression of the data group, use this:
_VFP.SetVar('rnTotal',rnTotal + [the variable holding the sum] )



>Brenda,
>
>Create a group in the report (if it is not yet there) based on the field in relation. Add two report variables:
>- var1 having initial value 0, value to store 1, calculate COUNT, reset on the group
>- var2 having initial value 0, value to store iif(var1=1,amount,0), calculate SUM, reset on the report end.
>
>Var2 should give you the total for the parent table.
>
>>The table is already selected and contains all the data that I can use. I am only allowed to make my changes in the report designer. I am helping a client who uses third party software to create the table and takes me right to the report designer.
>>
>>Brenda
>>>You do not need to change anything in the table:
>>>
>>>use (yourtable)
>>>sum (field_name) to variable_name
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