Quantity addition

Hi,

I am finding difficulty in adding the quantity of the same item in the report. I am grouping the report based on item no… Suppose i hav 5 items of the same name, I want its quantity to be summed up. I hav used the code as,

IF “Purchase Line”.FINDFIRST THEN
IF FORMAT(“Purchase Line”.Quantity) <> ‘’ THEN
REPEAT
Quant += “Purchase Line”.Quantity;
UNTIL “Purchase Line”.NEXT = 0;

With this code, its summing up the quantity of all the items wit different also. I want it to sum up only the items with same name and display the total. Can anyone suggest me the solution for this…

Hi,

For grouping of quantity u need to set relation between item master and purchase line So it will find the item from item master in purchase line and sum up that quantity and go for next item

or

U can design the report using report wizard and do the grouping on the basis of items

This will help you

After grouping the report by Item No.,

Add “Purchase Line”.Quantity in “Purchase Line” Group Footer section… it will automatically do it for you…

Use Group Header and Group Footer for this purpose. You first data item should be Item, 2nd should be Purchasse Line and this indented under Item. Link the two tables using properties. Filter Purchase Line for Type=Item

In properties of Purchase Line: Group Total Fields as “No.”

TotalFields : Quantity

and display quantity in GroupFooter section of Purchase Line

Thank u all :slight_smile: its working…