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

DB Link access.

Status
Not open for further replies.

bandarna

Programmer
Joined
Jan 2, 2003
Messages
122
Location
US
It is like this, we have a two different databases. e.g. Database A and Database B. I am creating a report form Database A. most of the tables are available at A side, but couple of table are at B-side. I know DB link and I know how to use in SQL. But I don’t know how can I do through Crystal wizard.

Link is like this: orders@DBIP.IBM

Any help?????
 
Add both databases to your report, and it will prompt you for linking. Then select the fields you want on your report. It is very straightforward. Have you tried it yet?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
I have added both databases by giving different user ids and passwords. I can able to add tables and selected columns from different tables and also I did links between the tables.

When I run I did not see the data from Database B. I did not ask DB Link anywhere. I wanted to see the SQL , from the menu database à show sql query is disabled.

What to do now? How can I use db link?
 
I assume that you're using Oracle and talking about Oracle's DB Link capability? If so, you cannot use the DB Link'd database tables from any Crystal expert. Crystal does not read the Oracle DB Links in a database and expose them in the Database Expert.

If you're using Crystal 9, you can write the query yourself in a SQL Command and use the DB Link using the table@DBLink syntax. If you're using an earlier version, you'd have to use Crystal Query or create a view or stored procedure to access tables through the link.

Adding both databases to Crystal and using Crystal's table linking capability will bypass use of the DBLink. It should work, as long as you don't mind two logins and the fact that any processing will have to happen on the client. Not being able to see the SQL Query text is a result of the linking of the two databases, since Crystal will really query each database separately and then join the results locally, there is no single Select statement to display.

I believe that you will get significantly better performance if you use the Oracle DBLink, either through a SQL Command, Crystal Query, or creation of a view. If you have the Select statement already written, you should be able to paste it into a SQL Command or Crystal Query and use it exactly as you would from SQL*Plus.
 
Finally decided to create a view. This is also helping me in reducing number of formulas at CR side. But I really don’t like CR not convenient for DB Links. Any way thanks for both you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top