Report Help...Inventory Aging Report

Hi all…3.7A here. I am almost finished with a custom Inventory Aging report…but I need some help. The report basically goes to the ILE table to get its info…it prints in two modes…summary or detail. In detail mode everything works great…it shows all lot numbers and how many days those pallets have been on the floor. In summary mode it adds up all the qtys from the lot numbers and prints one line of info per item which is what I want…but I cannot seem to get it to show the age of the oldest pallet. Instead it just shows the age of the last pallet in the group. I am calculating age as follows: Date1 := WORKDATE; Date2 := “Posting Date”; OLD := (Date1-Date2); Is there anyway to have it give me the highest “OLD” of the group and have it print that when running in summary instead of the last record scanned. I thought about SETCURRENTKEY but “OLD” is a variable and only exists on the report. Thanks, JP

You would just have to add a new variable OLDEST and print that on the summary line: IF OLD > OLDEST THEN OLDEST = OLD; You would also have to reset this for each Item.