Hi
I have a report that compare running total with a constant.
I want to present all records where running total is smaller then constant plus (and only) the first record where running total is equal or greater then constant.
tried the following :1. identify first record that meet the condition
WhilePrintingRecords;
numberVar N := 0;
if ({@accum_stoc}>=0 and next({@accum_stoc} )>=0 and Previous ({@accum_stoc} )<0 ) then N:={VU_QNTY_RUNNING_TTALS.DOC_NBR};
N;
then suppress records where recordNumber<= N+1;
However i am getting only n record # 141 in the example
and it does not work when part changes.
record
Number Rtotal const @accum_stoc part
140 24545 26650 2105 XXX
141 24571 26650 2079 XXX
142 29571 26650 -2921 XXX
143 450 2135 YYY
thanks
I have a report that compare running total with a constant.
I want to present all records where running total is smaller then constant plus (and only) the first record where running total is equal or greater then constant.
tried the following :1. identify first record that meet the condition
WhilePrintingRecords;
numberVar N := 0;
if ({@accum_stoc}>=0 and next({@accum_stoc} )>=0 and Previous ({@accum_stoc} )<0 ) then N:={VU_QNTY_RUNNING_TTALS.DOC_NBR};
N;
then suppress records where recordNumber<= N+1;
However i am getting only n record # 141 in the example
and it does not work when part changes.
record
Number Rtotal const @accum_stoc part
140 24545 26650 2105 XXX
141 24571 26650 2079 XXX
142 29571 26650 -2921 XXX
143 450 2135 YYY
thanks