I have tried to use the formula Latest to find the last purchase entry in Item ledger entries, for a specific item, but it seems like Jetreports pays attention to "Source No." even though this is not part of my filter…..How do I find last purchase line in Item Ledger Entries, when there are different source No?
1 comment
-
Jet Reports Historic Posts Hi jespermott,
I don't understand what you're saying about Source No. You could post your code if you want.
Otherwise I think you want a list of purchase items with the most recent date of purchase.
I would probably take an approach like this…
1) Use an NL("Rows") statement to create a summary list of all items that have entries of type 'Purchase' in the 'Item Ledger Entry' table.
C5 - =NL("Rows","Item Ledger Entry","Item No.","Entry Type","Purchase")
2) Use an NL("First") statement to return the most recent purchase purchase posting date. Use an NL("First") since Posting Date is sorted descending.
D5 - =NL("First","Item Ledger Entry","Posting Date","Item No.",$C5,"-Posting Date","*")
I haven't tested this but I think it will get you what you want.
Thanks,
davecroll