Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Is there way of doing this in Crystal? Post Reply Post New Topic
Author Message
ConfusedChap
Newbie
Newbie


Joined: 03 Mar 2009
Online Status: Offline
Posts: 1
Quote ConfusedChap Replybullet Topic: Is there way of doing this in Crystal?
     Posted: 03 Mar 2009 at 3:13am
Hi all
 
I have a table that i'm using Crystal to report on. It basically holds each persons unique reference and whther they were emailed or phoned. People can be emailed and phoned so they can appear repeatedly in the table.
 
What i'm trying to do is create some sort of formula that can tell how many were ONLY emailed and how many were ONLY phoned.
 
In SQL you would use an exclude query like
 
select count(REFERENCE)
from TABLEA
where CONTACT = 'EMAIL'
and REFERENCE NOT IN  (select REFERENCE
                                  from TABLEA
                                  where CONTACT = 'PHONE')
 
Does that make sense?
 
AS far as i know there is no way of using the 'Not in' option.
Does anyone know of any way this can be done??
 
Any help is much appreciated
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 03 Mar 2009 at 5:00am
Hi
 
Can you post the sample data from the table to playaround with......
 
Cheers
Rahul
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 03 Mar 2009 at 6:17am
You can use an outer join and look for values that are null.  It is faster than a not in, and Crystal will support it, though you can only look for phone or email, not both...but you could use a parameter to allow the same report to be used for both occurances.
 
Hope this helps
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