Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum function
Message
From
06/09/2002 12:14:14
 
 
To
06/09/2002 11:43:55
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00697564
Message ID:
00697596
Views:
11
Jeff,

Add a report variable, lets call it "total1". In "value to store", put "total1" (I know, it seems weird, no quote marks of course), Calculate Nothing, initial value of zero.

In the group "On Entry Expression" (double click on group heading bar in designer), put:
_vfp.setvar("total1",total1 + field1)
Now you can use total1 at the end of the report...

HTH

>Hello,
>
>Within a report, I am trying to sum field1 based on when field2 changes.
>
>Example:
>
>Field1 Field2
>1 222
>1 222
>1 222
>12 111
>12 111
>12 111
>6 444
>6 444
>---
>19 Is the Quantity I am looking for. The sum option seems to sum every column. Any help would be appreciated.
>
>Jeff
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform