Greetings all,
CR9, Informix procedure, Unix database.
I am attempting to get the loose quantities on a report to calculate correctly and not having much success. I need the report to first figure out what the remainder is per item, then sum that remainder for a total to be printed on the report.
item 1
qty= 140 / (full pallet count) 35 = remainder of 0
itme 2
qty = 150 / 40 = 30
item 3
qty = 256 / 30 = 16
print total 46 as Loose Qty Ordered.
The qty is determined thru the following:
whileprintingrecords;
shared numbervar sumOutbound_CPU :=
If {@fldTransact}="SHIP" Then
if {throughput.(expression):10}="CPU" and not ({throughput.(expression):13}="SHIPSHORT") then
sumOutbound_CPU +{throughput.(expression):9}
else
sumOutbound_CPU
else
sumOutbound_CPU;
What I tried was this:
shared numbervar sumLooseQty :=
if onlastrecord and (previous({throughput.(expression):3})={throughput.(expression):3}) and {throughput.(expression):18}>0 then
sumLooseQty:= sumLooseQty +Remainder({@qtytest},{throughput.(expression):18})
else
If not(next({throughput.(expression):3})={throughput.(expression):3}) and {throughput.(expression):18}>0 then
sumLooseQty:= sumLooseQty +Remainder({@qtytest},{throughput.(expression):18})
else
sumLooseQty;
I am getting an incorrect amount.
CR9, Informix procedure, Unix database.
I am attempting to get the loose quantities on a report to calculate correctly and not having much success. I need the report to first figure out what the remainder is per item, then sum that remainder for a total to be printed on the report.
item 1
qty= 140 / (full pallet count) 35 = remainder of 0
itme 2
qty = 150 / 40 = 30
item 3
qty = 256 / 30 = 16
print total 46 as Loose Qty Ordered.
The qty is determined thru the following:
whileprintingrecords;
shared numbervar sumOutbound_CPU :=
If {@fldTransact}="SHIP" Then
if {throughput.(expression):10}="CPU" and not ({throughput.(expression):13}="SHIPSHORT") then
sumOutbound_CPU +{throughput.(expression):9}
else
sumOutbound_CPU
else
sumOutbound_CPU;
What I tried was this:
shared numbervar sumLooseQty :=
if onlastrecord and (previous({throughput.(expression):3})={throughput.(expression):3}) and {throughput.(expression):18}>0 then
sumLooseQty:= sumLooseQty +Remainder({@qtytest},{throughput.(expression):18})
else
If not(next({throughput.(expression):3})={throughput.(expression):3}) and {throughput.(expression):18}>0 then
sumLooseQty:= sumLooseQty +Remainder({@qtytest},{throughput.(expression):18})
else
sumLooseQty;
I am getting an incorrect amount.