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

Two Databases in One Crystal Report? 3

Status
Not open for further replies.

boniblue

Programmer
Jun 27, 2006
10
0
0
US
Is it possible to combine two SQL server databases in one report?
They contain the same columns and datatypes but they are not related in any other way...it would be nice to append one to the other but is Crystal capable of doing this?
Thanks
B
 
I think this will require some configuration in the database.

I had a customer that did something similar by setting up some type of bridge connector that allowed both of the databases to be queried together but I couldn't tell you much more about it.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides for Formulas, Parameters, Subreports, VB, .NET, Tips and Tricks
 
I regularly connect to multiple databases in reports with no problems. I'm using Oracle, but it shouldn't be much different in SQL Server. In the rare cases where there is no logical link between the two sets of data, I usually have to use a subreport to pull data from the second database.

I have one report that's pulling data from 8 databases - a main table from one database that links to a table in each of the others with one subreport for each additional database. It takes a while to run, but it works well.

If you need to actually combine the data and there's no relationship, you'll probably have to set up a connection between the two and a view that will pull all of the data using a union query.

-Dell



A computer only does what you actually told it to do - not what you thought you told it to do.
 
The problem is that he needs to do a union query (not links) which would require a command object if done in CR. You can't cross databases with command objects.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides for Formulas, Parameters, Subreports, VB, .NET, Tips and Tricks
 
That's good to know - I haven't had to do that. So, it could potentially be done with a view, which I think can be done in Oracle, but I'm not sure how it would be done in SQL Server.

Thanks for the info!
-D

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Thank you both hilfy and KenHammady!
I actually only needed certain things from the one...so I created a sub report and linked it accordingly...it worked!
BUT...THANK YOU BOTH for you attention!
Have a WONDERFUL day!
Boniblue
:eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top