I am using SAP Crystal Reports version 14.3. I have numerous Crystal Reports .RPT files configured to use the same Access database (.accdb) file as their data source. I keep everything in a directory that contains the Access database and various subdirectories. Each subdirectory contains one or more .RPT files. It’s something like this:
MYREPORTS
|
+- MYDB.accdb
|
+- SUBDIR_A
| +- Report 1.rpt
| +- Report 2.rpt
|
+- SUBIDIR_B
| +- Report 3.rpt
| +- Report 4.rpt
I share copies of this directory structure with other users, who sometimes have to place them in a different storage location than the one I use. For example, I might locate mine in C:MYREPORTS. Someone else might locate theirs in D:THEIRREPORTS.
To enable the reports to work regardless of where they’re copied, I have set up the data connection for each .RPT file to use a relative path to the database, such as ../MYDB.accdb.I use an OLE DB (ADO) connection for the database.
This usually works quite well, but sporadically Crystal Reports loses its mind and can’t find the datasource. For example, the user chooses File–>Open, selects one of the reports, and the data source can’t be found. This may happen once, and when the user opens the same report later on, it doesn’t happen. It’s inconsistent.
When this happens, one workaround I’ve found is to exit Crystal Reports, and then open the .RPT file directly from the desktop to launch Crystal Reports and open the file, instead of launching Crystal Reports and using File–>Open. This seems to fix the problem, and if the user later uses File–>Open, somehow that method seems to work again.
I’m curious if any of you have an insights into this problem and how to prevent it.