Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

Show record with the greatest sequence number

$
0
0

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 13.5521/08/20191
Product 13.7501/01/20203
Product 13.8202/12/20192
Product 13.7928/01/20204

Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>