Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Setting database table path in a VB application Post Reply Post New Topic
Author Message
sajhak
Newbie
Newbie
Avatar

Joined: 06 Oct 2009
Location: Sri Lanka
Online Status: Offline
Posts: 12
Quote sajhak Replybullet Topic: Setting database table path in a VB application
    Posted: 10 Oct 2009 at 11:39pm
Hi all,
I have a VB 6 application with CR 9 ..

but if i change the path of the application exe , it gives an error when it tries to print report, because, it seems the path of database in CR s have been hard coded..

Can u give a solution for me to set the database path which has to be always in the same folder of the application ..
(relative path)

as i can see v can set the db path in two locations..one is in the report it self (open the report, right click database fields -> set datasource location ) and other way is to code the path in the form which is used to load the report ?? am i right ??? if v defined 2 different paths like that, which one will be taken by the application ??

Thanks in advance
sajhak
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Oct 2009 at 6:44am
I don't trust the code to correctly identify the path, though I don't have reason for this distrust other than alot of people trying it and posting questions.
 
An easier solution, is to change the values in the ODBC connection, or to change the connection to an OLE connection that you can change programatically, or better still, have the application get the data and then push it to the report.  It may take time to implement/change the reports, but once done, you (and Crystal) don't have to worry about these issues.  The data is always from the correct source, regardless of how many dbs you have or where they are located.  The application controls where the data is generated from, which is much easier to maintain then all the different types of connections/location combinations and backends headaches are gone.
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.