Greetings!
It is becoming critical for me to understand how CR XI chooses what database to look for.
As I understand it, the purpose of a DSN is to associate a common name with two (or more) databases on different computers when those databases have different names. If I have a DSN named MyDSN on Computer1 associated with a database named MyDatabaseOnComputer1 and I have a DSN named MyDSN on Computer2 associated with a database named SomeCompletelyDifferentName, then the same application that runs on Computer1 using MyDSN will happily run on Computer2 using MyDSN.
I have a database on my development machine named "AK 94 6_24". I have a DSN named WinCaps pointing to it. On my testing machine, the DSN is named "CAPS1" and the database is named "AKAnneal". The application is smart enough to know that it has to walk through all of the tables in my report and change them to make sure they're looking at the correct database. I added code to the application to print the location and the connectbufferstring properties for every table in the report into a file. The file shows me that the table connections are being changed correctly to use the CAPS1 DSN.
But when the application tries to display the report, it claims that data cannot be read from the database.
I have CR XI installed on the test machine. When I use it to open the report and preview it, I get the same error, with a bit more information. It is telling me that it cannot retrievbe data from the AK 94 6_24 database. Here's the complete query from Show Database Query:
SELECT "CHARGE"."charge", "CHARGE"."base", "CHARGE"."status", "CHARGE"."build_mode", "CHARGE"."built_by", "CHARGE"."built_date", "CHARGE"."furnace", "SEPERATOR_PLATE"."thickness", "CHARGE"."pred_heat_time", "CHARGE"."rev_heat_time", "ANNEAL_PROGRAM"."final_hotspot", "ANNEAL_PROGRAM"."final_coldspot", "CHARGE"."cooling_cover", "CHARGE"."furnace_type", "furnace_type"."description", "CHARGE"."inner_cover", "CHARGE"."flopper_stopper", "CHARGE"."cycle"
FROM {oj (("AK 94 6_24"."public"."charge" "CHARGE" LEFT OUTER JOIN "AK 94 6_24"."public"."seperator_plate" "SEPERATOR_PLATE" ON "CHARGE"."seperator_plate"="SEPERATOR_PLATE"."plate_type") INNER JOIN "AK 94 6_24"."public"."anneal_program" "ANNEAL_PROGRAM" ON "CHARGE"."charge"="ANNEAL_PROGRAM"."charge") LEFT OUTER JOIN "AK 94 6_24"."public"."furnace_type" "furnace_type" ON "CHARGE"."furnace_type"="furnace_type"."furnace_type"}
WHERE "CHARGE"."charge"=14860
Despite the fact that CR knows durn well that it's supposed to use the CAPS1 DSN, which is pointing to the AKAnneal database, it's trying to look for the AK 94 6_24 database! I have no idea why the name of that database got embedded into the report, why CR doesn't know to use the database pointed to by the DSN, or how to get it to work correctly!
I've asked this question before and gotten no answers. The issue is becoming critical. I need to be able to develop reports with the confidence that they will operate when they are installed on our customer's system, and I am not there yet.
Thank you very much.
RobR