Ash Gajjar
1st July 2005, 14:30
I have an existing Baan report which prints selective records from a table, grouped by item.

I have a need to customise this to only print the item group if the sum total of the item group meets a criteria, in my case if the Quantity of the item is less than the sum total of the planned quantity.

I can see the need to preprocess the item for validity, possibly by building up an item array, but this is an area where limited expertise fails me!

I have attached the report and the program script to give some kind soul a better understanding of my dilemma


Thnaking you in advance
ash

Debdas Banerjee
1st July 2005, 14:59
Hi Ash,

If you dont want the details line then go to " Maintain Report Layout " and
make 0 for "Output expr" .
After that goto report script if exits others wise creat report script and give the condition in before field of item group .
if On hand quantity > 0 then
lattr.print = true
else
lattr.print = false
endif


I hope it will work for you if I understand your actual problem.


Deb

Hitesh Shah
3rd July 2005, 10:12
I think debdas means the before.layout of after.field of item group and not before field.

Further a short cut is to find out the related total.. variable and use the same in report script for ur aggregated field . This will involve good maintenance effort when u changes the same .

Alternatively do the total in report script variable and use that variable in report script .

Rita Kotecha
5th July 2005, 14:03
Hi,

Please try this in your report script

detail.1:
before.layout:
if item.qty < total..0 then
lattr.print = true
else
lattr.print = false
endif