Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Selection question Post Reply Post New Topic
Author Message
barrymac1
Newbie
Newbie


Joined: 17 Aug 2009
Location: United States
Online Status: Offline
Posts: 10
Quote barrymac1 Replybullet Topic: Selection question
     Posted: 05 Nov 2009 at 7:12am
I have a table of students. Some students have multiple instances of the same specific class. I only want to see these students; not every student who has attended a specific class. Fields are 'uniquekey', 'coursecode', 'statusdate', 'startdate', 'regstatus'. I only want to see those 'uniqueid' that have more than one 'regstatus' for a specific 'coursecode'.
 
thanks in advance.
 
barry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Nov 2009 at 7:29am

Do you have to have this grouped in a way or the end result formatted in a particluar way?

It is often easier to do this outside crystal and if you do it in crystal it can limit the options for data presentation...
IP IP Logged
barrymac1
Newbie
Newbie


Joined: 17 Aug 2009
Location: United States
Online Status: Offline
Posts: 10
Quote barrymac1 Replybullet Posted: 05 Nov 2009 at 7:33am
No special grouping or presentation is required. I only need to see the students with multiple entries in a specific class so I can go back and clean up the database. thanks!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Nov 2009 at 7:43am

Can you post a little sample data of what you want shown and what you want removed?

IP IP Logged
barrymac1
Newbie
Newbie


Joined: 17 Aug 2009
Location: United States
Online Status: Offline
Posts: 10
Quote barrymac1 Replybullet Posted: 05 Nov 2009 at 11:38am
00008443 Martinez  09/09/2009  P  09/01/2009
00008443 Martinez  11/02/2009  M  10/01/2009
00008456 Cheng  10/05/2009  M  09/01/2009
00008473 Witherspoon  09/14/2009  M  09/01/2009
00008475 Katz  09/07/2009  M  09/01/2009
00008476 Kleinman  08/31/2009  P  08/01/2009
00008476 Kleinman  09/07/2009  M  09/01/2009
 
I only want to see the 2 Martinez and 2 Kleinman, I do not want to see the single record entries
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Nov 2009 at 11:53am

Here is one way:

Create a formula field to concantenate the first to fields together called "StudentAndCouse", probably like this:
{Table.studentname} + "-" + {Table.coursecode}
and then group on that formula field.
Now do an insert summary (Sigma sign)
do a Count of @StudentAndCourse with a location on group footer1
Click on the Record Select
Click on on show formula option
Change the toggle to Group Selection
click on formula editor
in the report fields grab the Report area Count field into your formula and make that >1 so you end up with something like
COUNT({@ StudentAndCourse}, {@ StudentAndCourse})>1
 
Does that give you what you need?
 
 
 
 
IP IP Logged
barrymac1
Newbie
Newbie


Joined: 17 Aug 2009
Location: United States
Online Status: Offline
Posts: 10
Quote barrymac1 Replybullet Posted: 05 Nov 2009 at 12:33pm
it's more than i have now. i'll let you know.
IP IP Logged
barrymac1
Newbie
Newbie


Joined: 17 Aug 2009
Location: United States
Online Status: Offline
Posts: 10
Quote barrymac1 Replybullet Posted: 06 Nov 2009 at 6:01am
Worked like a charm. Thanks a lot!!
 
barry
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