Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Data selection - multiples Post Reply Post New Topic
Author Message
lyman
Newbie
Newbie
Avatar

Joined: 01 May 2009
Online Status: Offline
Posts: 12
Quote lyman Replybullet Topic: Data selection - multiples
     Posted: 23 Apr 2013 at 10:58am
Working with CR10 and 2 tables: table one has student name and ID.  Table two has list of classes for each student.   
 
I'm trying to pull a list of student who is currently taking both math and science.
 
In the Record Selection, I've tried:  classtable.class_desc in ["Math","Science"]
and IsNull(classtable.completion_date
 
but I get students with Math but no Science or students with Science with no Math.
 
Also tried: (classtable.class_desc = "Math" and IsNull(classtable.completion_Date) and (classtable.class_desc = "Science" and IsNull(classtable.completion_Date) 
 
but nothing is returned. 
 
I know that there are students who are currently taking both classes so what am I missing?  
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Apr 2013 at 11:34am
if you do not want to write a comman object to do this then you can
use your first select statment to limit the records to just math and science group on the student
use a group select statement to find students that have both
minimum(classtable.class_desc, classtable.student)="Math" and  
maximum(classtable.class_desc, classtable.student)= "Science"
IP IP Logged
lyman
Newbie
Newbie
Avatar

Joined: 01 May 2009
Online Status: Offline
Posts: 12
Quote lyman Replybullet Posted: 23 Apr 2013 at 12:47pm
Smile  Thanks for the response!  I did manage to figure it out and the report is good. 
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