Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum of field based on date
Message
From
16/09/2006 20:58:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
16/09/2006 18:57:47
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01154432
Message ID:
01154438
Views:
10
>I have a table used in report with two fields SOMEDATE and SOMENUMBER.
>
>I have made group by SOMEDATE in report.
>
>I want in group footer to show total SUM of SOMENUMBER for dates before date that is current in group.
>
>How to do that? (preferably it would be variable)

You can create a report variable, and assign it an expression similar to:

iif(Condition, Value_To_Sum, 0)

Make it SUM, and reset it as appropriate.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform