General information
Category:
Reports & Report designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only