Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report sum help
Message
From
10/01/2006 04:23:47
Mk Sharma
Shrishti Solutions
Mumbai, India
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Report sum help
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01085056
Message ID:
01085056
Views:
61
i need help about calculation 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" "????????????"


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


warm regards,
mk.
Reply
Map
View

Click here to load this message in the networking platform