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

Change existing DB connectivity with a new one

Status
Not open for further replies.

BOSES

Technical User
Feb 8, 2000
11
AE
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?<br><br>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.<br><br>Can anybody help. And thanks in advance.
 
Are they canned reports or do you run them from the Crystal Designer?<br><br>If your app is in VB (using Crystal OCX):<br>' sDataPath = path to database<br>For i = 1 To iTableCount: Crpe1.DataFiles(i-1)=sDataPath: Next i<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>'if there are sub-reports<br>Crpe1.SubreportToChange = &quot;sub.rpt&quot;<br>Crpe1.DataFiles(0) = sDataPath<br><br>===<br>If Delphi (using Crystal VCL):<br><br>Crpe1.Tables.Retrieve;<br>Crpe1.Tables[0].Path := sDataPath;<br>Crpe1.Tables.Propagate := True;<br>===<br>If you run the reports from the Crystal Designer, then just click &quot;Database&quot;, &quot;Set Location&quot;<br> <p>Paul Wesson, Programmer/Analys<br><a href=mailto:paul@wessoft.com>paul@wessoft.com</a><br><a href= Wesson, Programmer/Analyst</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top