Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to sum subgroup
Message
De
11/01/2006 04:56:23
Mk Sharma
Shrishti Solutions
Mumbai, Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
How to sum subgroup
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01085512
Message ID:
01085512
Vues:
61
i need help about group sum in report

my prg code like below
clos all
sele a
use pcode1
set order to pcode
sele b
use sales
set rela to pcode into pcode1 addi
inde on pcode1.igroup+sales.pcode to xxsal
goto top
report form sales prev
i created a report like below

i have two groups

1.pcode1.igroup
2.pcode1.igroup+sales.pcode

in header of group 1

pcode1.igroup
-------------------------------------------------------

in header of group 2 (4 columns)
--------------------------------------------------------------------
"product" "Quantity" "qty per case" "Box"
--------------------------------------------------------------------

in detail band
sales.pcode sales.qty pcode1.perbox
"101" "25" "15"
"101" "80" "15"
"101" "57" "15"

in footer of group 2
--------------------------------------------------------------------
"(gqty)result 162" "(162/15) box result 10"

--------------------------------------------------------------------
"product" "Quantity" "qty per case" "Box"
--------------------------------------------------------------------
"102" "15" "18"
"102" "85" "18"
"102" "20" "18"

in footer of group 2
--------------------------------------------------------------------
"(gqty)result 120" "(120/18) box result 6"
for box conversion i am using below code and it gives perfect value
in group 2
iif(seek(pcode,'pcode1','pcode'),int(gqty/pcode1.perbox),0)

every product have different "pcode1.perbox" value


** "gqty" is a variable that i using to SUM sales.qty
it reset on pcode1.igroup+sales.pcode

what code i should write in footer of group 1
for total box ** result should be 16

in footer of group 1
--------------------------------------------------------------------
"(Fqty)result 282" "box result ????????????"


** "Fqty" is a variable that i using to SUM sales.qty
it reset on pcode1.igroup


warm regards,
mk.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform