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

Subreport Pagination & Pagination bug.


mwatkinson

Recommended Posts

understand from reading on the forums that it is not possible to use different pagination in a subreport to its 'master' report. As such if a master report is set to ignore pagination then all subreports also ignore pagination and vice versa.

This however causes me some problems because Ireports pagination does not work for the report I am working on. It is necesarry to have two detail sections per page containing the same data. The only way to achieve this was with subreports. Unfortunately to the best of my knowlege it is not possible to have subreprots where the first page is page 1 of each subreport, page 2 is page 2 of each and so forth.

Therefore i have had to put together the following report structure:

Master report

  • subreport - page 1
    • subreport first half page 1 - exactly 1/2 a page in size
    • subreport second half page 1 - exactly 1/2 a page in size
  • subreport - page 2
    • subreport first half page 2 - exactly 1/2 a page in size
    • subreport second half page 2 - exactly 1/2 a page in size
  • subreport - page 3
    • subreport first half page 3 - exactly 1/2 a page in size
    • subreport second half page 3 - exactly 1/2 a page in size
  • etc...

 

I have a seperate program which builds the jrxml with the appropriate number of subreports to create the correct number of pages, and simply adds aditional page subreports to the jrxml as required based ona preliminary SQL query to determin the page count.

I can generate each half page perfectly, and each whole page also generates correctly with paginations set to ignore. However if pagination is enabled due to some display when sections I end up with an extra page with blank detail lines IE:

Master report

  • subreport - page 1
    • subreport first half page 1 - exactly 1/2 a page in size
    • subreport second half page 1 - exactly 1/2 a page in size
  • Page 1.5 blank defail lines overflow from page 1 second half
  • subreport - page 2
    • subreport first half page 2 - exactly 1/2 a page in size
    • subreport second half page 2 - exactly 1/2 a page in size
  • Page 2.5 blank defail lines overflow from page 2 second half
  • subreport - page 3
    • subreport first half page 3 - exactly 1/2 a page in size
    • subreport second half page 3 - exactly 1/2 a page in size
  • Page 3.5 blank defail lines overflow from page 2 second half
  • etc...

 

And with pagination set to ignore the report generates correctly, but is all on a single page. I need some way to have the individual pages generate correcty IE without pagination and then have the final report use pagination so that the report is correctly paged.

Additionally there appears to be a bug in the pagination, whereby a detail line is forced onto the next page even if it can fit if it has 'print if' componants which are not being printed. I.E. I have a barcode which appears on some of my detail lines which causes them to take up 3 lines, however the last 2 lines are pushed onto a new page even when the barcode is not displayed.

 Any ideas how I can get thsi report to work given that it is not possible to have pagination on in the master report and off in the subreports?

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I discovered a work around for the pagination bug - I set the page height large enough to fit two additional detail lines (an extra 22 pixels) and this prevented the report from placing the last two lines of the report on a new page even though there was sufficient room on the first page.

At this point I would simply like to know if the bug can be corrected so that work arounds of this nature are no longer required.

[edit - fixed a couple of typos]



Post Edited by mwatkinson at 09/22/2011 18:52
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...