hahagal Posted July 20, 2011 Share Posted July 20, 2011 Hi,When previewed on the report, I encounter the following error. I am using subreports in the report, and using DB2 (JDBC connection) Is there any settings needs to be done? Error filling print... Unable to get next record. net.sf.jasperreports.engine.JRException: Unable to get next record. at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:95) at net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:861) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:779) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1448) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:112) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:923) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:59) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:857) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][10120][10898][3.57.110] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null at com.ibm.db2.jcc.am.bd.a(bd.java:660) at com.ibm.db2.jcc.am.bd.a(bd.java:60) at com.ibm.db2.jcc.am.bd.a(bd.java:103) at com.ibm.db2.jcc.am.am.Db(am.java:4219) at com.ibm.db2.jcc.am.am.c(am.java:314) at com.ibm.db2.jcc.am.am.next(am.java:293) at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:91) ... 12 more Print not filled. Try to use an EmptyDataSource... Post Edited by hahagal at 07/21/2011 14:36 Link to comment Share on other sites More sharing options...
hahagal Posted July 21, 2011 Author Share Posted July 21, 2011 Anyone out there encounter the same problem as me or is there any solutions to this issue? Link to comment Share on other sites More sharing options...
despec Posted July 21, 2011 Share Posted July 21, 2011 Could you include the ".jrxml" file? Might be easier to troubleshoot your issue. David Link to comment Share on other sites More sharing options...
hahagal Posted July 22, 2011 Author Share Posted July 22, 2011 Hi,I have attached the mainreport and subreport jrxml here.Using the followings:- ireport 3.7.1- JDBC connection- Use the same connection use to fill the master reportPost Edited by hahagal at 07/22/2011 01:15 Link to comment Share on other sites More sharing options...
hahagal Posted July 22, 2011 Author Share Posted July 22, 2011 Hi,Just to also check if subreports can be placed in any section of the main report like Page Header, Column Header, Details and etc. I have tried to put the subreport in the Summary section and seems no error. Link to comment Share on other sites More sharing options...
despec Posted July 22, 2011 Share Posted July 22, 2011 Is your query string is making a call to a stored procedure? If so, I notice you're passing two parameters to the procedure. Have you tested the stored procedure in a SQL client to make sure what you're passing to the procedure will actually return something?David Link to comment Share on other sites More sharing options...
hahagal Posted July 25, 2011 Author Share Posted July 25, 2011 Hi,Yes, am using stored procedures. When I try to print the subreports individually, it is ok. If the subreport is putted at the summary section, it is ok as well. Only when the subreport is been putted at other section then will have problems. Link to comment Share on other sites More sharing options...
cannotsay Posted May 4, 2012 Share Posted May 4, 2012 I had this problem in one of our client sites.After much searching we found an issue with IBM DB2 connections and isolation levels.If you are withing Websphere and are using a datasource connection go to Data Sources -> <Data source name> -> Custom PropertiesSet the variable ResultSetHoldability to 1 If you are not using this, I believe you can:1) Use a Connection with auto commit set to false2) use the IBM rather than generic driver Hope this helps. Link to comment Share on other sites More sharing options...
deepikamohan23 Posted June 14, 2013 Share Posted June 14, 2013 how to solve this 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