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

Crystal Reports 8 - Change Report ConnectionString

Status
Not open for further replies.

VisualDeveloper

Programmer
Feb 11, 2002
1
GB
I have a main report which contains around 5 subreports. For each of the reports inlcuding the main report I set the data source by using the ADO ConnectionString and Data Link Properties dialog box. The problem is, when I move my VB application to another location including the database, the reports no longer functional as they try to look in the older place. How can I change that ConnectionString at runtime, so basically change:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\Desktop\Autohouse Solution\Data\dbAutohouse.mdb;Persist Security Info=False"

To:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Data\dbAutohouse.mdb;Persist Security Info=False"

Please help - Im using VB6 with Crystal Reports 8.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top