New Report Field

I created a new purchase line field X. This field is calculated as:

X = (purchaseline.quantity * 100) / Y

Where Y is the sum of my quantity lines.

My problem is that all records in Report are printed in RoundLoop Body, and I only have the result Y field in Footer.

How can I get Y value in my Round loop body, to make my field X correct??

Hi,

Create a record variable of purchase line. Filter it using purchase order no. and now add purchase line quantity filed for all lines for that order

Example:

y=0;

PurchaseLineTemp.Reset ;

Setfilter.PurchaseLineTemp(“Order no.”,PurchaseLine.”Order No”);

If PurchaseLineTemp.Findfirst then begin

Repeat

y=y+PurchaseLineTemp.Quntity;

until PurchaseLineTemp.next=0

End;