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

Multiple page reports


hangman01

Recommended Posts

I am currently working on a report that can at times expand into more than one page. This report is made up of a main report containing the individual’s contact information like name and address etc, and a sub-report containing that individual’s scoring information for each of a possible 11 exams. Along with the name of the exam and the date it was submitted the person’s score and a list of the number of each question missed is displayed for each newly listed exam for that person. It is possible that an individual has taken and submitted exams before and when that individual adds new ones taken only the name of the exam and some score information is shown but not the list of missed questions. There is a possibility that the list of numbers can become 8 lines long if the person missed every question on one of the exams.

My problem is occurring when the report needs to add a second page to display all the detail data. When the second page is present the report loses the ‘layout’ lines in the detail band on the first page of that report. All other data is printed and correct. If the “print when detail overflows†box is selected I get blank report for every individual after their complete report is produced. The entire layout is there along with the contact information in the page header band but no sub-report data is displayed. Since this report can generate several hundred individual reports at one time it is not practical to produce that many blank pages.

[file name=mksap14_scrpt.jrxml size=30889]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/mksap14_scrpt.jrxml[/file]

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

handman01,

 

It is possible that you may have to change the 'Stretch Type' of each of your fields to 'Relative to Band Height' or 'Relative to Tallest Object'. If that's not it, then I would look at the main report's band properties. Make sure that whatever band your subreport is located in also allows 'Split'. Thirdly, if it still doesn't work, try altering the 'Print when Detail overflows' option. If any combination of these doesn't work, then it sounds like the problem may be internal(to iReport). I have seen similar posts to this elsewhere, try searching this forum for similar topics...Hope it works out...

Link to comment
Share on other sites

Thanks for the suggestions, but unfortunately, I have already tried them all, and many more. with no success at all. A little extra information I have found as I have been trying to find an answer to this problem. I can make the labels for the data in the detail band appear correctly by shifting those objects to the column header band. For any report that has expanded to 2 pages the layout lines will only appear on one page unless the "print when detail overflows" option is checked. If this option is checked then I get a blank page with all the layout and the data for the main report for each report regardless of whether the report has one or two pages required.

I started building this report using version 1.3.3 and I recently started to use version 2.0.0 but it reacts the same with both.

Also I have found out that the PAGE_COUNT variable is always equal to 1 for my single page reports but when the second page is produced the PAGE_COUNT for that page equals 0 not 2 as I was expecting. Sorry to make this so long but I am trying to give as much information as I can on this problem and hope that someone can find an answer for it.

Link to comment
Share on other sites

Some more additional facts I have found are that the page number is not showing as increasing for the extra pages produced by this report. The page count shows as 0 in the page header band of the report and the page number starts as 1 and counts the pages produced correctly when the display is not in the detail band. Inside the detail band the report does not seem to recognize the fact that a second page has been produced. The text field displays the same values as on the first page even though these numbers have changed in the page header band.

I have included a small screen shot of my report displaying very different page count (pc) and page number (pn) values on the same page. This actually an extra blank page after a report that requires 2 pages to complete.

size=171]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/scr_sht.jpg

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