Jump to content
Changes to the Jaspersoft community edition download ×

Printing sub-reports on a new page

2006 IR Open Discussion

Recommended Posts

By: new_tech - new_tech

Printing sub-reports on a new page

2004-07-22 14:31

Hi Giulio,

I am new to iReports and have a question about printing sub-reports on a new page.

I have a main report which is a combination of three sub-reports. My objective is to have the 1st 2 sub-reports print on one page in PDF Viewer and have the 3rd sub-report on a new page. Is there a way I can do this?

I am using v 0.3.2 for report design.

Thanks in advance.




By: C-Box - c-box

RE: Printing sub-reports on a new page

2004-07-23 01:41

This is more a JasperReport Question than an IReport-Question, but anyway.


You have to put each of your SubReports in a own group (that's necessary for not overlapping each other if they flow)... within a group, you can switch on an option "startonnewpage"... that would be for your first two subreports FALSE and for your third group it would be TRUE.


That's all.






By: new_tech - new_tech

RE: Printing sub-reports on a new page

2004-07-23 09:35

Thanks for your help, C-Box.

I tried using groups for printing sub-reports on different pages, but it did not work.

Here's what I did:

1. On my main report page, I defined new groups, for example, a new group called app_person_group and checked 'Start on a new page'.

2. I included a sub-report (app_person_subreport.xml) in the app_person_groupHeader and set this sub-report's property, 'Print when group changes' to app_person_group.

3.Compiled and ran the report. All sub-reports still show up on the same page.

What am I doing wrong? Should I set 'Group Expression' to something?

Please help!





By: C-Box - c-box

RE: Printing sub-reports on a new page

2004-07-23 14:42

No you needn't a "group expression" just let it empty,


but be sure to place EACH SubReport into a own groupheader... you neither need to edit the "print when group changes" property, just move your subreports from current detailband to its correspondig groupheaderband. The detailband can be empty (if you haven't any other fields on it)








By: new_tech - new_tech

RE: Printing sub-reports on a new page

2004-07-27 12:54

Sorry for popping up the same problem again!

I did as was suggested, i.e., put each of the sub-reports in their respective group header, did NOT set "Group Expression" to anything, left the "Start on New Page" option on the 1st 2 groups UNCHECKED and CHECKED this option on the last group. However, all 3 sub-reports still turn up on the same page.

I wonder if there is a runtime environment setting in iReport 0.3.2 that I should change.


Anyway, to reiterate my problem, I have 3 sub-reports on a MasterReport, each of which is results from a database table. The 1st 2 sub-reports must be displayed in PDF viewer on the main (cover page), followed by some static text and the last sub-report (also a set of records in a db table) must be displayed on the following (separate) page.

Thanks very much for the help!




By: jorge - jorge_msf

RE: Printing sub-reports on a new page

2004-08-25 01:44

I have exactly the same problem, i want one subreport in the main page and one in a separate page. I do the same way as describe above but it did not work for me also.



By: grotero - grotero

RE: Printing sub-reports on a new page

2006-01-12 05:04

One possible solution is to place the last subreport in the summary band and check the option "Summary on a new page" in the report options.

Post edited by: tcloonan, at: 2006/09/02 10:29

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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