jkeri Posted June 8, 2018 Share Posted June 8, 2018 I have a MAIN report with an EXCEL data source and a SUBREPORT with an ORACLE datasource.In MAIN: created parameter called subConn class: java.sql.ConnectionDefault Value Expression: java.sql.DriverManager.getConnection("jdbc:oracle:thin://mylocalhost:1521/mysid", "user","password")Added the subreport element into DETAIL bandSubreport element 'Expression:' is $P{subConn}MY PROBLEM: When I run the subreport by itself it returns values as expected. HOWEVER, when I run the main report I get "Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection".As far as I can tell my Default value expression is correct eacuse it is the same value as the data source for my subreport. And the subreport runs correctly when it is run by itself. ANY ideas of what or where else i can look? Link to comment Share on other sites More sharing options...
jasperrocks Posted June 13, 2018 Share Posted June 13, 2018 In the subreport connection expression, you can use $P{REPORT_CONNECTION} and the above mentioned connection string in Data source expression.I don't think you don't need to create this $P{subConn} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now