Hi All,
I am writing an application that uses the Crystal Reports 9 RDC. I have found something strange and I am wondering if it is normal, if there are any workarounds, or if anyone else thinks this is a bug.
If a report with database tables to an access file is opened using OpenReport(), the connection properties of the tables are very strange.
If I enumerate through the ConnectionProperties, I get the following:
PreQEServerType: PDBDAO.DLL
PreQEServerName: C:\Program Files\Common Files\System\MAPI\1033\xtreme.mdb
UserID: Admin
Data File: C:\Program Files\Common Files\System\MAPI\1033\xtreme.mdb
None of the above ConnectionProperties are documented and when trying to call a documented property, such as "Database Name", it will fail with an error.
Now HERE is the really strange part.
If you open that same report twice, that is using the Application object, make a second call to OpenReport() with the same exact report, you now get these connection properties.
Database Name: C:\Program Files\Common Files\System\MAPI\1033\xtreme.mdb
Database Type: Access
Database Password: (write only)
Session UserID: Admin
Session Password: (write only)
Session Database Path: (blank string)
Which are the correct and documented ConnectionProperties.
What is going on? Any ideas? Go ahead and try it. I get the same results on any number of computers I try it on. I have also installed the latest Monthly hotfix and it doesn't fix it.
Jeremy
I am writing an application that uses the Crystal Reports 9 RDC. I have found something strange and I am wondering if it is normal, if there are any workarounds, or if anyone else thinks this is a bug.
If a report with database tables to an access file is opened using OpenReport(), the connection properties of the tables are very strange.
If I enumerate through the ConnectionProperties, I get the following:
PreQEServerType: PDBDAO.DLL
PreQEServerName: C:\Program Files\Common Files\System\MAPI\1033\xtreme.mdb
UserID: Admin
Data File: C:\Program Files\Common Files\System\MAPI\1033\xtreme.mdb
None of the above ConnectionProperties are documented and when trying to call a documented property, such as "Database Name", it will fail with an error.
Now HERE is the really strange part.
If you open that same report twice, that is using the Application object, make a second call to OpenReport() with the same exact report, you now get these connection properties.
Database Name: C:\Program Files\Common Files\System\MAPI\1033\xtreme.mdb
Database Type: Access
Database Password: (write only)
Session UserID: Admin
Session Password: (write only)
Session Database Path: (blank string)
Which are the correct and documented ConnectionProperties.
What is going on? Any ideas? Go ahead and try it. I get the same results on any number of computers I try it on. I have also installed the latest Monthly hotfix and it doesn't fix it.
Jeremy