raph Posted February 24, 2007 Share Posted February 24, 2007 Hello all ! I am using JasperReports 1.3.1 and iReport 1.3.1.I am having the following strange problem with a SubReport. I have a main report that lists some information in the detail band. There is a group header/footer and on the footer, I want a little table that makes a summary of the current group (using a subreport). Then the next group gets printed with all the details and then another group footer containing the subreport. The problem I am encountering is that when there is only I group (and therefore the subreport gets printed only ONCE), everything works perfectly. As soon as there are several groups, I get the following error when running the report : 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:99) at net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:842) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:760) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1078) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:751) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:660) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:815) at java.lang.Thread.run(Unknown Source) Caused by: org.firebirdsql.jdbc.FBSQLException: The result set is closed at org.firebirdsql.jdbc.FBResultSet.checkCursorMove(FBResultSet.java:217) at org.firebirdsql.jdbc.FBResultSet.next(FBResultSet.java:249) at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:95) ... 11 more Print was not filled. Try using an EmptyDataSource... The database I am using is Firebird. Since it says "The result set is closed", the idea I have is that once the subreport prints the first time, it closes or unhooks the connection which means any subsequent attempts to rerun the subreport fail with the above error message. Has anyone ever had this problem in the past? I have bought the iReport manual, searched the newsgroups and even followed the flash tutorials on building subreports, but I seem to be doing everything right (I'm obviously not though, right?! ;) ) Thanks for your help, Raphael Link to comment Share on other sites More sharing options...
csbac Posted May 29, 2007 Share Posted May 29, 2007 Hi!I have the same problem (also firebird).I haven't tried with "one group only", so thanks for pointing in this direction ...I also found the following:http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=5847#5847 It seems the query/statement needs to be kept open even after "commit" ... or after fetching the last result row, so it can be reused? I'll try in this direction ...maybe someone else has an idea? Yours,SebastianPost edited by: csbac, at: 2007/05/29 11:56 Link to comment Share on other sites More sharing options...
cadorca Posted August 7, 2007 Share Posted August 7, 2007 To fix the problem you should specified in the connection url defaultResultSetHoldable=Truefor examplejdbc:firebirdsql:10.1.1.1:dbPath?defaultResultSetHoldable=True I spent a lot of time searching for the solution, I hope this help a lot of people. Camilo. Link to comment Share on other sites More sharing options...
csbac Posted August 8, 2007 Share Posted August 8, 2007 Hi!Thanks a lot, solved the problem ...before, I patched the JasperReports code to open queries with HOLD_CURSORS_OVER_COMMIT ... Unfortunately, I start running into other bugs ... stuff that worked on Monday, no longer works ... trying hart to find out what's going on ...(Date parameter is set as String, but does not have Timestamp format ...) Thanks,Sebastian 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