Jump to content
Changes to the Jaspersoft community edition download ×

Bad Pagination


rsoler

Recommended Posts

Hi,

 

I'm trying to do a PDF Report, from a XMLDataSource. Also I'm using iReport for my reports design.

When I generate the Report, with amount of data that overload the first page it works fine.

But when I generate a Report with less data, the Jasper generates a strange pagebreak. Why?

There's a space in the fisrt page without nothing. I have all the report content in the Detail band, but I also try to divide it in some other bands as Column Footer, but my problem doesn't disappear.

I'll give you my jrxml as example.

Please, can anyone help me?

 

Thanks in advance [file name=matricula_exemple_detall.jrxml size=95210]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/matricula_exemple_detall.jrxml[/file] size=391]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/bad_formed_little.jpg

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

You have a huge detail band (664 pixels in height).

Even if you are hiding portions of its content using the printWhenExpression on those frames, the engine will still use the original detail height to evaluate if it fits on the current page or not.

And with that many subreports inside, the detail actually stretches and empty space is collapsed only in the end.

Simply put, given the large detail size, the engine would still think it will overflow, even empty space is collapsed after. To solve this, you should split the large detail using a trick like this:

http://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/FAQ8

 

I hope this helps.

Teodor

Link to comment
Share on other sites

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