Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Pulling the most recent data Post Reply Post New Topic
Author Message
Alb2tead
Newbie
Newbie
Avatar

Joined: 06 Nov 2012
Location: United States
Online Status: Offline
Posts: 13
Quote Alb2tead Replybullet Topic: Pulling the most recent data
    Posted: 08 May 2013 at 8:26am
I am creating a report where I can pull the data into three different groups.  The issue that I am having that in one of the tables there are multiple dates that are linked into table, causing the other sets of data to repeat itself.  How can I just take the most recent date in the category that is causing multiple returns of the same data?
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 08 May 2013 at 11:10pm
Hi

In the lower level grop, sort (desanding order )the records based on date, place the date on group header to pickup the latest date record set
Thanks,
Sastry
IP IP Logged
joeg1962
Newbie
Newbie


Joined: 01 Mar 2013
Location: United States
Online Status: Offline
Posts: 35
Quote joeg1962 Replybullet Posted: 13 May 2013 at 3:50am
One approach I have used to pull the last data that corresponds to a date is as follows:
01/01/2012 = abc
07/01/2012 = def
01/01/2013 = aaa

So, I can get the maximum of date, but how to find the accompanying result/value?
Convert each into a pair, such that
with a string command to date format, place a "." & then the other data
20120101.abc
20120701.def
20130101.aaa

So, I sort to get maximum of
20130101.aaa
And then pull the data apart to get the related data after the "."

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.