Solved

Crystal Reports: Using right table as a filter to left table data

Posted on 2013-06-21
4
581 Views
Last Modified: 2013-06-21
I have two tables joined in my report.  The Left table contains all the data elements (fields) I want to display in my report.  The right table contains a list of data (a single field) with values matching some of the entries in left table for the linked field (PATIENT_NAME).

I would like to display all PATIENT_NAME entries NOT found in the right table. essentially using the right table as a list of PATIENT_NAME entries to filter out of the report.  If the name exists in the right table I do not want that name displayed on the report.

How can I best accomplish this request?

Thnaks,
0
Comment
Question by:jbrazie
  • 2
4 Comments
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 500 total points
ID: 39266366
Left outer join the tables and put ISNULL(PATIENT_NAME) in your record selection criteria
0
 
LVL 18

Expert Comment

by:vasto
ID: 39266401
Use Left join and put in the where clause check for PATIENT_NAME = null

the corresponding SQL will look like this:

SELECT t1.*
FROM Table1 t1 LEFT HOIN Table2 t2 ON t1.PATIENT_NAME=t2.PATIENT_NAME
WHERE t2.PATIENT_NAME is null
0
 
LVL 18

Expert Comment

by:vasto
ID: 39266461
I had to refresh before to post this.  rhinok's post said everything
0
 

Author Closing Comment

by:jbrazie
ID: 39266593
So simple when you put it that way...

It worked perfectly thank you so much! Rhinok you are the MAN (or woman)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question