assassinator
28th October 2011, 11:48
I narrate the condition.
I make a display session. Just display item, Lot, order(include purchase order and production order), Lot Qty on Hand. The user require the record which 'Lot Qty on Hand' is zero would not display in form.
'Lot Qty on Hand', tdltc001.stoc was defined double type. So I wrote like this:
before.program:
query.extension = "tdltc001.stoc > 0.00001"
But it doesn't work. I thought the fault would be the decimal digits. And then I wrote this script:
field.tiitm001.cuni:
before.display:
select tdltc001.clot, tdltc001.olot, tdltc001.orno, tdltc001.item,
tdltc001.cprj, tdltc001.cntr, tdltc001.ardt, tdltc001.quam, tdltc001.stoc
from tdltc001
where tdltc001.olot = tdltc.olot.prod
and tdltc001.orno = (:order)
order by tdltc001.olot, tdltc001.orno, tdltc001.ardt desc, tdltc001.clot desc
selectdo
if double.cmp(tdltc001.stoc, 0.0, 0.00001) = 0 then
endif selectempty
endselect
In the IF statement, I can find out the zero record. But how can I do to eliminate these in display form? In the other word, can I eliminate the zero record in SELECT statement. I tried to add this code:
and tdltc001.stoc > 0.00001
It did not take effect.
I make a display session. Just display item, Lot, order(include purchase order and production order), Lot Qty on Hand. The user require the record which 'Lot Qty on Hand' is zero would not display in form.
'Lot Qty on Hand', tdltc001.stoc was defined double type. So I wrote like this:
before.program:
query.extension = "tdltc001.stoc > 0.00001"
But it doesn't work. I thought the fault would be the decimal digits. And then I wrote this script:
field.tiitm001.cuni:
before.display:
select tdltc001.clot, tdltc001.olot, tdltc001.orno, tdltc001.item,
tdltc001.cprj, tdltc001.cntr, tdltc001.ardt, tdltc001.quam, tdltc001.stoc
from tdltc001
where tdltc001.olot = tdltc.olot.prod
and tdltc001.orno = (:order)
order by tdltc001.olot, tdltc001.orno, tdltc001.ardt desc, tdltc001.clot desc
selectdo
if double.cmp(tdltc001.stoc, 0.0, 0.00001) = 0 then
endif selectempty
endselect
In the IF statement, I can find out the zero record. But how can I do to eliminate these in display form? In the other word, can I eliminate the zero record in SELECT statement. I tried to add this code:
and tdltc001.stoc > 0.00001
It did not take effect.