How can i change datasource of a rpt report in Cystal Reports Server
I have 3 different machines with Crystal Reports Server XI R2 installed. They are at different subnets pointing to different oracle databases with same schema definition but different names (dev, test, production).
I got a rpt file created on the development environment, pointing to the "dev" schema. All went fine. The report executed successfully.
When i got the same rpt and published it in the test server, i could not change the datasource location. It appears that the rpt file keep fixed the datasource that was used in its creation.
Anyon开发者_如何学JAVAe knows how can i change the datasource of a rpt file, making it independent of database location and independent of the database used by the designer?
Thanks
I assume from the question that the different Oracle databases have different database names, but the same schema name - something like OperationalDB on dev, test and live? (It's more complicated if they have different schema names.)
If so, then it depends on what sort of Driver you're using.
If using an ODBC driver, then simply set up different ODBC sources (pointing to the appropriate database) with the same data source name on each of the Crystal machines.
If using a native Oracle driver, then I suggest editing the TNSNAMES.ORA file on each of the machines so that they each have the same TNS name pointing to the appropriate database.
If using a native Oracle driver and you are unable to edit the TNSNAMES.ORA file (for example, if it is a shared network file instead of being located on each of the Crystal machines), then you will need to change the datasource location in the Report Designer (or via the API, if accessing Crystal through one) each time you transfer a report from one machine to another.
精彩评论