robin.koch Posted May 16, 2013 Share Posted May 16, 2013 Hello,I want to print every group of a table on a new page but if I try it with page breaks jasperserver throws a Null Pointer Exception. Is there anyone who can help me? Stacktrace (page break in the group footer):java.lang.NullPointerException java.lang.NullPointerException at net.sf.jasperreports.engine.fill.JRFillBand.isPageBreakInhibited(JRFillBand.java:505) at net.sf.jasperreports.engine.fill.JRFillBreak.prepare(JRFillBreak.java:233) at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:331) at net.sf.jasperreports.engine.fill.JRFillFrame.prepare(JRFillFrame.java:216) at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:331) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:379) at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:353) at net.sf.jasperreports.engine.fill.JRFillBand.refill(JRFillBand.java:333) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2055) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooter(JRVerticalFiller.java:943) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooters(JRVerticalFiller.java:809) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:299) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:155) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:655) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:203) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Link to comment Share on other sites More sharing options...
Thomas Zimmer Posted May 19, 2013 Share Posted May 19, 2013 Hi Robin,I assume you are using the Table-Component as you wrote. I'm not very comfortable with this, but page breaking seams easy. Attach a dataset to the table having the group. Activate the property "Start on new page" with the dataset group you like. the table groups start on new pages now. see the example report attached (using foodmart jdbc datasource, works on the Jasperserver, too).IMHO, Never ever user page breaks in Jasperreports!Even if I don't know your report, i would say, better build a table-layout report without the table element, possibly as asubreport. You will have more control and flexibility like thi, although it may a bit more work to implement.Cheers, Thomashttp://www.thomaszimmer.net Link to comment Share on other sites More sharing options...
robin.koch Posted May 21, 2013 Author Share Posted May 21, 2013 Thank you, that did it. Link to comment Share on other sites More sharing options...
Lwazi.Nxumalo Posted May 26, 2016 Share Posted May 26, 2016 Exactly what I was looking for thanks a lot. 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