×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Change existing DB connectivity with a new one

Change existing DB connectivity with a new one

Change existing DB connectivity with a new one

(OP)
My reports are connecting to an existing link in the oracle database. I want to refer to a different database. How do I do it?

The main reports has multiple sub reports being called from the main report and also as multiple SQL queries reference with it. All of them has a reference to a single database and now I want to reference a differnt database.

Can anybody help. And thanks in advance.

RE: Change existing DB connectivity with a new one

Are they canned reports or do you run them from the Crystal Designer?

If your app is in VB (using Crystal OCX):
' sDataPath = path to database
For i = 1 To iTableCount: Crpe1.DataFiles(i-1)=sDataPath: Next i
    
'if there are sub-reports
Crpe1.SubreportToChange = "sub.rpt"
Crpe1.DataFiles(0) = sDataPath

===
If Delphi (using Crystal VCL):

Crpe1.Tables.Retrieve;
Crpe1.Tables[0].Path := sDataPath;
Crpe1.Tables.Propagate := True;
===
If you run the reports from the Crystal Designer, then just click "Database", "Set Location"

Paul Wesson, Programmer/Analys
paul@wessoft.com
Paul Wesson, Programmer/Analyst

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close