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

URGENT - setting Crystal Report (.rpt) Database Location

Status
Not open for further replies.

jis712

Programmer
Aug 2, 2001
2
GB
I’m in the process of Packaging my VB6/ Access 97 database application, which will be installed at my workplace. I’ve created the application on my home PC, with the database and VB application in a folder on my C: drive.

However, to allow multi-user access, I will be installing the VB application on the C: drive of a number of PC’s at my workplace, and the Access database on a departmental network file server G: drive.

I’ve changed the DatabaseName property of all the Data Controls in my VB application to the proposed location of the database (on the G: drive). Also, I’ve changed all the ReportFileName of all the Crystal Reports objects in my VB application to the proposed location of the Crystal Reports .rpt files (on the C: drive).

However, the question is, how do I get the actual Crystal Reports .rpt files to locate the proposed Access database location (i.e. G: drive). I’ve tried the Set Location command in Database/Set Location in Crystal Reports but it doesn’t allow me to set the location of the database to the proposed G: drive location.

Is it simply a case of putting the reports .rpt files in the same location as the Access Database and then setting Database/Set Location to Same As Database, and changing the VB application ReportFileName of all the Crystal Reports objects to the same location?

Thanks in advance.

Jis
 
Are you connecting to the database natively or by ODBC?
If it is ODBC then you will need to point the ODBC datasource to the correct database. Then go into Crystal and set the location to the new database location. If you strip each of the tablenames in Crystal back to just the table name (ie - remove the database name and .mdb from the string) then each time the report is run using ODBC, as long as the ODBC datasource name is exactly the same as the one that you used to set the location in crystal, you can access any database with the same table names.
I have not developed reports which connect natively to the datbase, but it is my understanding that the reports must be in the same directory as the database.
Please let me know if you need further help (or a more detailed explaination!)
Justine.
 
Thanks for your reply Justine.

I am connecting to the database natively, I think (!). No password is required to access the database on the file server.

A more detailed explanation would be appreciated.

Thanks.
Jis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top