I know this is an old question, but since it is the first result on google.. Here is how I got it working using a MS SQL connection for a subreport (and using an Oracle db in main report), which removes the need to hardcode the connection to the sub report's data source on Jaspeserver: 1. pass the main data source to the report unit as usual, and create the other data source on jasper server you want to use in the sub report 2. in the main report, create a parameter $P{yourDataSourceParam} with Class type: com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.JdbcReportDataSource and default value expression: com.jaspersoft.jasperserver.api.engine.jasperreports.util.RepositoryUtil.getThreadRepositoryContext().getRepository().getResource(null,"/Data_Sources/YourDataSource") 3. Now you can call functions on this parameter and pass in the connection to your subreport...like this 4. On your main report, select the subreport and remove all the expression entries. Create a parameter that you will pass to the subreport named 'REPORT_CONNECTION', with expression like this: java.sql.DriverManager.getConnection($P{yourDataSourceParam}.getConnectionUrl(),$P{yourDataSourceParam}.getUsername(),$P{yourDataSourceParam}.getPassword()) 5. :)