New to Crystal so any help will be greatly appreciated.
Trying to get the most recent cost of a product out of the database using Crystal Reports. The table has many records of a particular product with varying costs as the costs change frequently. Each time a new cost is created the sequence (Seq) number related to that is incremented. e.g. Product 1 will have a cost of 3.55 updated on the 21/08/19 with Seq number 1, then cost updated again to 3.82 on 02/12/19 it will be given Seq number 2 etc. With this logic I will always have the latest product cost by selecting the highest Seq number record on the table.
How do I write a formula or create a sort record to only show / return the product cost (ITMCOST) field on the record with the highest sequence (ITCSEQ) field value?
The report is Grouped by product category with Fields {ITMCOST.ITMNAME_0} & {ITMCOST.ITMCOST_0} in the Details section.
The table looks like;
Cheers
{ITMCOST.ITMNAME_0} | {ITMCOST.ITMCOST_0} | {ITMCOST.UPDATE_0} | {ITMCOST.ITCSEQ_0} |
Product 1 | 3.55 | 21/08/2019 | 1 |
Product 1 | 3.75 | 01/01/2020 | 3 |
Product 1 | 3.82 | 02/12/2019 | 2 |
Product 1 | 3.79 | 28/01/2020 | 4 |