Unanswered: Version 9 SQL editing - how to remove database name?
I have a report saved in version 9 format. When I try to add another table to the report, Crystal Reports insists on adding the database name prefix to the SQL query that is generated. This is a problem because I need to be able to switch database locations between differently named ODBC connections depending on test vs. production environments. If I add a table to the report, the SQL always includes "database1"."dbo"."tablename". If I need to change the location of the data source from database1 to database2, the "database1" remains in the SQL statement and causes an "Unknown Query Engine Error". I know that it's possible to use a SQL Command to specify what SQL is used, but I would prefer not to have to do that because I have quite a few reports which need to be modified by adding the new table. I also would like to be able to switch back and forth between the test OCBC name and the production ODBC name by switching datasource locations. Is there any way I can get Crystal to stop explicitly including the database name in the SQL it generates?
Problem solved. I needed to upgrade to version 184.108.40.2061 via the latest Hotfix and then 1.) change datasource location for the database 2.) specifically change datasource location for the problem table. This successfully changed the SQL text to the new ODBC name. The fully qualified database name was not removed, but this is an easy workaround. I had actually tried this before, but it didn't work with the older version of Crystal Reports 9 that I previously had installed.