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!

Records not Reported

Status
Not open for further replies.

fsub

Programmer
Feb 2, 2006
60
US
I have two tables that are 'Equal' joined. I'd like to report on all records in TABLE1 as well as all records in TABLE2. I am finding that records in TABLE2 are not reported when the linking item is not in TABLE1. In other words, if I have records 2010, 2012 and 2013 in TABLE1 and records 2010, 2011, 2012 and 2013 in TABLE2.....record 2011 in TABLE2 is not reported. What do I have to do so all records in TABLE2 are reported?
 
Us a full outer join, if this is not available in your version of Crystal use a command to bring back your data

select * from
Table1
full outer join table2 on table1.fieldPK = table2.FieldFK

Ian
 
Thanks Ian. I suspected that would be the solution but the ways I can redo the join are not available to me in CR8.5. Visual Link join option is greyed out. 'Database > Show SQL Query' is also greyed out. My source database is Access.
 
I only used 8.5 with SQL, but you should be able to use your database expert to make the link "Left Outer".

Note that any test applied to TABLE1 will spoil this, because missing records have Nulls in their fields, and Null stops everything. Testing IsNull first should get round this.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
PS You can use SQL with Crystal 8.5, but it's vastly awkward compaired to later versions, and I forget the details.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
You can not use SQL with Access as Access is not true SQL database.

I am not an Access user so dont know if you can create a view in Access which does the same thing.

Failing that you might be able to create an access view which unions data into a single table.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top