Need help with main report with a subreport- v6.3.0

I have a MAIN report with an EXCEL data source and a SUBREPORT with an ORACLE datasource.


  1.  created parameter called subConn 
  2. class: java.sql.Connection
  3. Default Value Expression: java.sql.DriverManager.getConnection("jdbc:oracle:thin://mylocalhost:1521/mysid", "user","password")
  4. Added the subreport element into DETAIL band
    1. Subreport 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?


jkeri's picture
Joined: Mar 15 2013 - 12:17pm
Last seen: 4 years 8 months ago

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}

jasperrocks - 5 years 3 months ago

0 Answers:

No answers yet