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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking 2 tables question 2

Status
Not open for further replies.

pk400i

MIS
Feb 10, 2009
102
US
HI I have 2 tables from an Oracle database that I want to use in a Crystal Report. One is a main table with most of the info and the other one is used just to retrieve the paycode info.

If the main table does not find a match in the secondary table is this record dropped completely as I wouldn't want that but would want to code something to the effect that this customer does not have a paycode. I believe the Crystal default is to drop unmatched records but I wanted to verify that.

 
It defaults to an inner join. All you have to do is right click your link and make it a left outer. Then if there is no matching record the paycode would show as blank. Then you can just write a formula with an IF statement to make it say whatever.
 
After changing the link to the left outer, you can use a formula in the body of the report like:

if isnull({table.paycode}) then
"No paycode" else
{table.paycode}

...assuming paycode is a string.

-LB
 
HI I clicked on "Link" but am not sure where to right click,
in order to change the inner to an outer join.
 
If you right click on the line that represents the link it turns bold and a menu opens->link options. Then you can change the link.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top