To access page reports via URL, you can switch the connection in the same database or between different databases at runtime with the commands listed in the section Commands for working with server resources via URL. As a result, if the databases you want to switch between have the same structure, you will then be free from having to build another similar catalog. You can use the switch database commands to set the JDBC connection or to change the user name/password in order to connect to another database.
Switching the connection and user/password in the same database
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.jdbc_url=jdbc:oracle:thin:@host:1521:demo
The URL for switching the user ID and password:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.db_user=Scott&jrs.db_pswd=tiger
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.jdbc_url=jdbc:sybase:Tds:host:5000/product
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.jdbc_url=jdbc:inetdae:host:1433?database=JTTest&sql7=true
Switching the connection between different databases
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.jdbc_driver=sun.jdbc.odbc.JdbcOdbcDriver&jrs.jdbc_url=jdbc:odbc:products
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.jdbc_driver=com.inet.tds.TdsDriver&jrs.jdbc_url=jdbc:inetdae:JT_P05:1433?database=products&sql7=true