Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not get the correct Grand Total
Message
 
 
To
13/04/1998 00:51:16
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00091431
Message ID:
00091446
Views:
21
The following data is the result of SQL from two tables (customer table and payment table) where each customer can have partial payments. e.g: John has a credit limit of 100 and he's paid three times (5, 10 and 30). I want the Grand Total to show only the actual total of credit limit of each customer (John=100, Marry=300, Tony = 300) which comes to 700. But the total on the summary band always shows 1200. How can I get the sum of 700 of 3 customers' credit limits ?

Yes, I got your problem.

>> Use Variables option at Report Pad Menu. Declare 2 variables:

1. VarGrp for group counter
Value to Store Expr : VarGrp + 1
Reset at : Group Name (Field Group Name)

2. VarTotal for summary total
Value to Store Expr: IIF(VarGrp = 1, VarTotal+CredLimit, VarTotal)
Reset at: End of Report

>> Place VarTotal at Summary Portion of Report form.

I hope this helps,


JESS
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform