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 previ created a report like below
------------------------------------------------------- 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