Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Record selection using formulas Post Reply Post New Topic
Author Message
Dooberjolly
Newbie
Newbie


Joined: 21 Nov 2011
Location: United Kingdom
Online Status: Offline
Posts: 1
Quote Dooberjolly Replybullet Topic: Record selection using formulas
     Posted: 21 Nov 2011 at 12:42am
Hi,
 
I am new to using Crystal (well have used it to produce basic preport for a little while but trying to do something a little more fancy).
 
I am trying to use a formula field to pull out data from a linked table. Currently the report uses a main table which has a unigue record for a ticket. I have linked a second table that pulls the unique identifier from the main table and pulls out the notes (there will be many) that are linked by this unique identifier.
 
The formula will search the JournalType field for the type 'solution'. Using instr. This works in most cases, however in some cases there will be more than one 'solution' entry. When this is the case I would like to pick out the one with the latest datastamp (most recent).
 
I can't get my head around how to do this and would appreciate any help you are able to provide.
 
Thanks
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 21 Nov 2011 at 5:18am
using record selection formulas, you probably can't, as you don't know if there is record that is read later that will more recent, but all is not lost.
 
If you group by the item and order by the 'solution' record date, you can display the 'solution' record in the group footer or the header depending on which way you sort the data.  The footer or header, only display 1 record, either the first or the last of the group.
 
HTH
IP IP Logged
Printable version Printable version

Forum Jump
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