Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print Number of goods in some report
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Print Number of goods in some report
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00979631
Message ID:
00979631
Views:
61
I know I readed that sort of questions a hudred times, but ...
Here some data first
Field1 Good  Val   
000000 001    12
000000 001    10
000000 001    23
000000 001    12
000000 001    10
000000 001    23
000000 001    12
000000 001    10
000000 001    23
000000 002    12
000000 002    23
000000 002    12
000000 002    12
000000 002    23
000000 002    12
000000 002    12
000000 002    23
000000 002    12

000001 001    10
000001 001    23
000001 001    12
000001 001    12
000001 001    10
000001 001    23
000001 001    12
000001 001    12
000001 001    10
000001 001    23
000001 001    12
000001 001    12
000001 002    13
000001 002    13
000001 002    13
000001 002    13
000001 003    13
000001 003    13
I have two Group bands
2. By Good
1. By Soc

In second Grou band i want to print:
Total Number of Goods: (number of goods printed before)
i.e. at the end of Soc = "00000" I want to print
Total Number of Goods: 2
at the end of Soc = "00001" I want to print
Total Number of Goods: 3

I add a report variable named "goodsnum"
Initial Value = 0
Value to Store = 0
Calculation Type: Sum
Reset At:Group: Soc (1)
In "On Exit" of the Group footer of Group2 (Goods) I add:
_VFP.Setvar("goodsnum",goodsnum+1)
But iwhen I print this variable
At the end of Soc = "000000" it Shows 9 ????
At the end of Soc = "000001" it Shows 8 ????

What I do wrong?
TIA
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Next
Reply
Map
View

Click here to load this message in the networking platform