Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Filter based on most recent Post Reply Post New Topic
Author Message
mallerdy
Newbie
Newbie


Joined: 16 Jan 2013
Online Status: Offline
Posts: 6
Quote mallerdy Replybullet Topic: Filter based on most recent
     Posted: 17 Jan 2013 at 7:02am

Hi All,

I have a report that simplified looks as follows

 

Member Number          Date of Evaluation               Evaluation Result

1                                12/1/12                               100%

1                                11/1/12                                50%

1                                 10/1/12                              75%

2                                 11/30/12                             60%

2                                  10/15/12                            75%

2                                 9/15/12                               80%

etc.

 

I want to filter based on the most recent evaluation date.  The most recent can be any date so I can't filter based on a date range.  I just need in the above example for the first row from each client to display.  Any suggestions?

 

Thanks,

Mike

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jan 2013 at 7:23am
group on member number
sort on date of evaluation as descending
place the date and result fields in the group header
supress detail and GF section
IP IP Logged
mallerdy
Newbie
Newbie


Joined: 16 Jan 2013
Online Status: Offline
Posts: 6
Quote mallerdy Replybullet Posted: 17 Jan 2013 at 7:54am
That worked great.  I thought my next step would have been easy, but I think it is affected by your solution.  Now that I have only the most recent showing, I am trying to only display those that are most recent that have a certain percentage.  So I need to only show the most recents that have 100% in this example.  I tried just a selection expert for "is equal to" for the percentage, but it brings back in all dates that have 100%.
 
Thanks,
Mike
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jan 2013 at 8:09am

use a conditionally suppression on the group header section

field>value
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jan 2013 at 8:10am
just keep in mind that you are not actullay removing any data in either solution, you aer just hiding it. Hidden data is still part of the data set for the report.
IP IP Logged
mallerdy
Newbie
Newbie


Joined: 16 Jan 2013
Online Status: Offline
Posts: 6
Quote mallerdy Replybullet Posted: 17 Jan 2013 at 8:30am
I'm sorry, I don't understand how to complete your advice. I am new to CR's.  How do you conditionally supress in a group header section?  Thanks.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jan 2013 at 8:35am
open the section expert
sselect the GH section
open the 'suppress no drill down' formula box (x-2 button)
add a boolean formula here to suppress on a condition. True suppress, false shows so you want
table.field<100
this assumes that the % field is numeric.
also note youare suppressing the group header based on the first row of the group by doing this. That si why I had you sort the group descending
IP IP Logged
mallerdy
Newbie
Newbie


Joined: 16 Jan 2013
Online Status: Offline
Posts: 6
Quote mallerdy Replybullet Posted: 17 Jan 2013 at 10:52am

How would I apply what you showed me to a string field.  I really appreciate your time!  It worked for my numerical fields.

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