Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: How to get Current Record Post Reply Post New Topic
Author Message
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Topic: How to get Current Record
    Posted: 20 Nov 2014 at 9:51am
I have a report that pulls employees based on eff date and term date.  When we have a rehire, that person's record has a multiple lines;
 
Eff 01/01/2014 Termd 03/15/2014
Eff 04/01/2014 to current
 
I want my report to only pull the employees that are truly termd currently. Not that have a term date in any line.  So my report is pulling back all records that ever had a term date, even if they have a current eff line as a rehire.
 
I only want the records that have a term date in them, with no other line that shows that they are effective currently.
 
I have someone saying it has to do with 'maxrecord', but not sure how to get this to do what I want....
 
TIA
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 20 Nov 2014 at 12:02pm
If you filter by a not null Termed date, seems like that should show what you want (unless I am not reading it correctly.
IP IP Logged
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Posted: 20 Nov 2014 at 12:30pm

I tried to filter by not a null termed date and the data doesn't change. 

In the example I give above, the employee is actually 'active' still since their last line was eff 04/01/2014 to current.
 
I would not want to show this person on my report because their most current line is showing them still active.
 
I only want to pull actual termed employees, which I see their records like this:
 
Eff 01/01/2014 termed 03/15/2014, Jason Smith
 
Eff 01/15/2014 termed 04/01/2015, Robert Smith
 
Those two records above would show and this record would not, since her last line is still currently active;
 
Eff 01/15/2014 termed 04/15/2014, Jane Smith
Eff 04/16/2014 to current Jane Smith
 
I could be explaining wrong too, sorry!  But appreciate your help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Nov 2014 at 4:02am
easist way is to do it in a command object or a stored procedure with somehting like a not exists portion in the selection.
If you need a crystal select solution you can do it using group select, but it is not clear what else you may need to do with the results.
which direction do you prefer?
IP IP Logged
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Posted: 21 Nov 2014 at 6:29am
In researching what we were trying to do, we found that the actual database is not up to date.  Usually our database keeps the most current record would be exlcluding the record from our report because the last record is still active.  So we need to get our data up to date and the report will actually do what we want it to do!  Thank you everyone for your feedback!
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.