Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 08 Nov 2007 at 12:05am
I would use the Maximum() function. However, this function only works with arrays, so I would convert the list to an array dynamically. I discuss this programming trick and many others, in Chapter 7, Writing Formulas, of my new book.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 08 Nov 2007 at 1:56pm
Do you have any groups in your report? If so, another option is to add a descending sort on the date field and then put all of your data in the group header (NOT Footer!) for your inner group. This will display just the first "detail" record, which will be the most recent date because of the way the data is sorted.
Joined: 15 Nov 2007
Location: United States
Online Status: Offline
Posts: 46
Posted: 07 Dec 2007 at 11:11am
A co-worker and myself figured out a way to do this using the Maximum function. In the Section Expert of the Details section we put the following code in the formula editor of the Suppress option:
{End_date} <> Maximum ({End_Date})
I tested this with 2 to 4 records and it gives me the most current date each time. Hope this helps.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum