Print Page | Close Window

Linking 2 databases in one report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7685
Printed Date: 01 May 2024 at 3:59am


Topic: Linking 2 databases in one report
Posted By: sjoerddevor
Subject: Linking 2 databases in one report
Date Posted: 14 Sep 2009 at 10:02am

Hello,

 

I'm working with Crystal reports for a while now, and I really like the program! But I hope you can help me with the following problem:

We have got 2 databases. Both databases contain some information which is equal to the other, but in different tabels.

I want to link the two databases, and get all the information in one report. Is this possible? (Like, the reference number are the same in both databases. I want to link the reference numbers, and get the information which is attached to that number...)

I hope i made myself clear...
Sjoerd.



Replies:
Posted By: DBlank
Date Posted: 14 Sep 2009 at 10:05pm
what is your source data type?


Posted By: sjoerddevor
Date Posted: 15 Sep 2009 at 3:24am
It's a "ODBC (RDO)" type??


Posted By: DBlank
Date Posted: 15 Sep 2009 at 6:56am

Use your report wizard.

In the "Available Data Sources" I assume your 2 sources will be in your History (if not you will have to create 2 connections) , just grab the table from one ODBC connection from source A and do the same for Table B from the other ODBC. It is the same as adding 2 tables from one DB.
Link them on the field of your choice although the fields must be of the same data type.


Posted By: sjoerddevor
Date Posted: 15 Sep 2009 at 7:28am
Oke thanks, i'm gonna try that.
 
But, what if the data types are not compatible?
The one database contains 123456789 and the other one 123.456.789
How can i still connect them, is that possible?


Posted By: DBlank
Date Posted: 15 Sep 2009 at 7:34am
You would need to alter one or the other (or both) to make them compatible. You may be able to do that in your source (e.g. create a SQL view or Stored Proc to convert the field and use that as one source) or you would have to use a COmmand as one source and do your conversion there.


Posted By: sjoerddevor
Date Posted: 16 Sep 2009 at 4:11am

Thank you.

Is there an other way to make them compatible? The database is to big to convert... and is linked to a whole company, so not an option...


Posted By: DBlank
Date Posted: 16 Sep 2009 at 6:46am
Not that I am aware of.
Please note that you do not have to convert an entire DB, just one field in one table and use that as your link.



Print Page | Close Window