Solved

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

Posted on 2013-06-21
4
578 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now