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

multiple database relations

Status
Not open for further replies.

dwilliams

Programmer
Jan 15, 2001
10
US
Can you have two databases db1, and db2. db1 has data that youi are primarily using and db2 has data that you only need a bit of and is related to data in db1. Can you relate the two db's to be linked inside of Crystal Reports and if so how?
 
You can either link them directly by adding both tables (one from each db) and then linking them.

Or, if they don't link well, you can use subreports. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Now that I know that I should use sub-reports I have several other questions, such as, is using a subreport better than a dictionary when you can't get to distinct db's to reference each other?

Also, to me it seems more beneficial to use sql in the report ot extract data from the db's. With this in mind how can I import sql into the crystal report and subreport say if I've built the query in sql server query analyzer? Or better yet how can I import sql into the report? I haven't been able to figure this out. I'm using CR8.
Thanks again.

dan
 
Crystal dictionaries still require linked tables. They are mainly good for simplifying the view of the data (renaming tables, prejoining tables, renaming fields, limiting the tables and fields that show to the user, etc.)


If you create a view or Stored Procedure you should be able to access that as a table in the database.

To see SPs you may need to change your File Options (SQL tab) to make them visible.

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top