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!

Experts Plz! How can I print info from 1st DB that don't exist in 2nd

Status
Not open for further replies.

5timesnc

Programmer
Feb 21, 2002
8
0
0
US
I asked this last week, and didn't get an answer. First, thanks for any assistance you can provide, I've only been using Crystal a few weeks. I have an Oracle DB that I need to compare to an AS/400 DB (through ODBC) which is already set up and I am able to link the two DBs (albeit with errors). If you link different DBs, you have no control as far as the join is concerned, as it defaults to an equal join. I need to print records from the first DB, that don't have a corresponding match in the second DB. What makes matters worse, is the field I need to link the DBs, are different data types (numeric in the 1st DB (Oralce), and alphanumeric in the 2nd DB(AS/400). I will also need to do the same compare of DBs, in reverse order. I hope this makes sense to someone out there. If this requires any coding, an example would be GREAT. Please HELP and be specific as possible, as this is an URGENT requirement. Is it possible to do this in CR, or should I find a new vocation? THANKS again.
 
You can create a report from the first database and in the detail section, insert a subreport using the second database.

The link parameters from the main report will be used in the subreport to locate a match. The data type is not an issue here because you can convert either the data type of the parameter being passed in to the subreport (use a Formula) or do the conversion in the record selection expression within the subreport.

Cheers,
- Ido ixm7@psu.edu
 
Link the two tables together and in your record selection formula, use IsNull({Table2.KeyField}). You KeyField should be in both tables.

This will give you all the records in table 1 that do not exist in table2.

Change teh formula to IsNull(Table1.KeyField}) and you will get the items in table 2 that are not in table 1.
Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top