Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Tables with No Records

Status
Not open for further replies.

TEM3

Technical User
Dec 6, 2004
324
US
We are using CR 8.5 with Oracle 9.1 tables.

Not sure if this is a CR question, an Oracle DB question, or just a database fact of life??

Two major tables: LABCASE and LABEXAM. Linked by Casekey. Always a record in LABCASE. 99.9% of the time, one or more records in LABEXAM. However, sometimes there is not a record in LABEXAM. When that happens, even though there is a record in LABCASE, with the two linked, I get nothing.

Is there a way to report a record in LABCASE when it is linked to LABEXAM and without a record in LABEXAM??

 
What is the join type? A Left Outer join from LABCASE to LABEXAM will list everything in LABCASE whether there is a matching row in LABEXAM or not. An inner join will list only those rows where there is a match in both tables.
 
I always use left outer. Tryed it both ways (LABCASE to LABEXAM and LABEXAM to LABCASE). Nothing. Unless there is a record in both, Crystal Reports 8.5 (the way it is set up) will not select a record.

But, as you say, it should, I will have to play some more.
 
Hi,
If Left Outer is selected and you have no selection criteria applied to the LABEXAM table, it certainly should return any records from LABCASE that meet whatever criteria you have set..

I have never known it not to work..

When you check the Sql ( Database..Show Sql) does the where clause have the proper syntax ?

Are you connecting to the Oracle data using a native connection?





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
You shouldn't just automatically use a left join--in some cases this will make your report unnecessarily slow. Anyway, the left join must be from Labcase to Labexam. Note that if you use a record selection criterion on any field in the labexam table, the left join will be undone--that might be the issue.

-LB
 
I will investigate Monday morning. I believe my connection is "native". Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top