cancel
Showing results for 
Search instead for 
Did you mean: 

How do I change the Database connection my report is using?

Former Member
0 Kudos

Hi

I am new to Crystal Reports for Eclipse. I have been writing this report to pull information from a test database. Now I want to use that report to grab database from my production database which has the exact same structure as the test database.

How do I make a report point to a different Connection name? I can't seem to find an option or property that allows me to bind a report to a database connection.

Help!!?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The Java Reporting Component has the capability of changing a database connection at runtime, meaning that when you use the JRC to view or export the report there are API that allow you to reset the connection as well.

[The Crystal Reports Web Samples|https://smpdl.sap-ag.de/~sapidp/012002523100006008982008E/crxi_r2_jrc_web_smpl.zip] (otherwise known as the JRC Web samples) do contain two samples that should be of use to you; the jrc_display_connection_info, which you can use to display connection info for your reports so that you know what database properties you need to change, and jrc_change_database_connection which has sample code that changes a connection at runtime.

Also available for further info is the SDK Library found at http://boc.sdn.sap.com

Former Member
0 Kudos

Ok.. the info you gave me seems to be usefull only if i am trying to create a web application.

But let's say i am not trying to create a web application at this time. I am using the "preview" tab to look at the report. And I want to point that report to a different database than the one I originally desinged it for, HOW can I do that?

(granted both database have the same format table schema ect...)

Former Member
0 Kudos

Hello Michel,

If you want to change datasource location from Eclipse without creating a web application, then please follow following steps :

For the explaining this stpes, I am taking one example where I need to change db connection from SQL to Oracle

1) In the Database----> connections, make sure that both the connections i.e SQL and Oracle are in connected mode.

2) Open your report.Say report is created with SQL connectivity

and now you want to change this to Oracle.

3)Select Crystal Reports tab in eclipse and click on set Datasource Location option.

4) Select Oracle connection,click on OK and click on preview option.

So if your Oracle connection is in runnuing state, it should now point to the Oracle server.

Thanks,

Chinmay

Answers (0)