Jump to content
We've recently updated our Privacy Statement, available here ×

How to make a page break after group change in table?


Recommended Posts


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 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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

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, Thomas


Link to comment
Share on other sites

  • 3 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...