Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Displaying data based on most recent date Post Reply Post New Topic
Author Message
Keithscott
Newbie
Newbie


Joined: 07 Jun 2010
Online Status: Offline
Posts: 1
Quote Keithscott Replybullet Topic: Displaying data based on most recent date
    Posted: 07 Jun 2010 at 12:34am
Hi all,

I'm quite a new Crystal user and this is the first time I've posted so please go easy! You've already solved many of my teething issues in previous posts so thanks!

I have data that looks like this:

Table 1: <NameID> <Name>

Table 2: <NameID>, <RatingID1>, <RatingDate1>, <Rating1>, <RatingID2>, <RatingDate2>, <Rating2>

I need to get Crystal to select the record from table 2 that has the most recent date (based on the RatingsDate field), and then display the relevant Rating field on the Report based on this most recent date.

Can this be done. I have been trying to use the MAX function in the record select expert but have been receiving errors that this must be evaluated later?

Thanks in advance for any ideas you can pass to me.

K




IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 07 Jun 2010 at 3:59am
I haven't tried something like this in CR. I would try creating a stored proc to do the processing as you can make the selection into several steps.  Your data has 2 dates and ratings and I don't think that CR can group/compare on the 2 values...at least I don't see a easy simple solution in CR. 
 
Again, a stored proc is much more flexible in this regard and you can return only the data that you need making the logic of the report much simpler.
 
HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.