Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print Number of goods in some report
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00979631
Message ID:
00979711
Vues:
13
Hi Boris,

Create two following report variables
Variable: rnLines
Value to Store = 0
Initial Value = 0
Calculation Type: Count
Reset At:Group: good

Variable: rnGoodCount
Value to Store = IIF(rnLines=1, 1,0)
Initial Value = 0
Calculation Type: Count
Reset At:Group: Soc 
The rnGoodCount varable will hold the count of goods per soc.

>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
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform