Jump to content
Changes to the Jaspersoft community edition download ×

Page breaks: unexpected behavior


rcracel

Recommended Posts

I am not certain that this is actually a problem, it may rather be something that I haven't been able to grasp yet. I have been faced with the following problem from one of the report designers who work on my project...

 

In one of my (many...) Jasper reports, I have two subreports (in the detail pane), which in turn have their own subreports, similar to the following scheme...

 

Code:

[+] RPT
|--[+] Doctors
| |-- Letter (one or more)
| |-- Summary
|--[+] Facilities
| |-- Letters (one or more)
| |-- Summary

** each branch under RPT indicates a subreport, each subreport is to be printed on a new page.

 

If I just produce the reports with no page breaks, Doctors and Facilities overlap. The text actually prints one on top of the other and is unreadable.

If I add one page break in RPT, between Doctors and Facilities, the summary sections print one on top of the other making that text unreadable.

If I add two page breaks in RPT, between Doctors and Facilities, the report prints fine regardless of the number of pages (letters) generated by the reports. (according to the person who brought me this problem)

 

I've tried to mess with the positioning (relative to top, floating, relative to bottom...) with no success...

 

any help is appreciated...

Roger

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

All you have to do is to place the subreports one bellow the other (making sure that they do not overlap, not by one pixel) and set positionType="Float" for the second subreport. Also make sure you don't set any stretchType for the subreport elements.

 

Try this scenario without page breaks first, and then add the required page break between the subreports (again, make sure that the page break element does not overlap any of the subreports).

 

HTH,

Lucian

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