Skip to Content
Former Member
Jun 30, 2006 at 12:48 AM

JRC XI R2 Change Database Connection Sample


This Sample will also work with JRC XI R1.

This sample demonstrates how to change the database that a report uses at runtime in the JRC.
NOTES: To help determine what connection properties need to be changed at runtime through code, create
a copy of your original report and use the Crystal Reports designer to change this report to new datasource
manually. Then use the jrc_display_connection_info helper sample to compare the connection information
between the original report and the copy of that report pointing at the new datasource.
The connection information properties from the output generated by the jrc_display_connection_info
sample that are different in the report pointing at the new datasource from the original can
then be set through code to help ensure that the database connection properties are changed correctly.






1. Setup an application context on your application server to host a web application. For assistance with setting up and deploying a web application using the Java Reporting Component, refer to this whitepaper:
2. Extract the contents of this folder into your web application's context root.

3. In a browser window, launch the file jrc_change_database_connection.jsp as follows:

http:// : / /jrc_change_database_connection.jsp