Jump to content

Howto avoid page breaks inside of subreports?


Linuxhippy

Recommended Posts

Hello,

 

1.) I have a report which consists of several sub-reports (3 levels). Is there any way to force a page break if a sub-report does not fit enterly on a page?

 

The structure looks like:

<main-report>

 

<sub-report/>

<sub-report/>

 

<sub-report>

<sub-report/> (which has e.g. 3x the details-row)

<sub-report/>

</sub-report>

 

<sub-report>

<sub-report/>

</sub-report>

 

</main-report>

 

2.) Does anybody know samples how I can call reports with several subreports from java? I don't know for now e.g. how to set the queries. Just a link would be enough :)

 

Thanks a lot, lg Clemens

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

 

It would better if you could put only one question per message.

 

1) Subreports or text fields can be prevented from splitting across pages by putting them in bands that have isSplitAllowed="false". I suggest you isolate subreports in separate bands using dummy groups as explained here:

http://www.jasperforge.org/jasperreports/faq.html#FAQ8

 

2) Subreports can have their own queries inside them. And you only pass them the connection. There is nothing special when filling reports that have subreports and you can see all that in the /demo/samples/subreport sample provided with the JR project package.

 

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