Jump to content
JasperReports Library 7.0 is now available ×

minHeightToStartNewPage


robertsv

Recommended Posts

Hello :)

 

I have three groups and I want that:

if the group "Country" is started then there should be enough space to start "City" group and

if the "City" group is started there should be enough space to start "Block of city" group and

if the "Block of city" group is started there should be enough space at least for the first line of detail section.

 

In worst case (if remaining vertical space ir minimal) the generated report should look like this:

 

Some Country

Some City

Some Block of city

first line of detail section

---- end of page ----

 

What values for minHeightToStartNewPage of each group I should set?

Are those minHeightToStartNewPage values listed below correct?

 

Example:

 

Code:

<group name="Country -" minHeightToStartNewPage="78" >
<groupExpression><![CDATA[$F{country}]]></groupExpression>
<groupHeader>
<band height="22" isSplitAllowed="true" >

...
</groupHeader>
<groupFooter>
<band height="0" isSplitAllowed="false" >
...
</groupFooter>
</group>
<group name="City -" minHeightToStartNewPage="56" >
<groupExpression><![CDATA[$F{city}]]></groupExpression>
<groupHeader>
<band height="22" isSplitAllowed="true" >

...
</groupHeader>
<groupFooter>
<band height="0" isSplitAllowed="false" >
...
</groupFooter>
</group>
<group name="Block of city -" minHeightToStartNewPage="34" >
<groupExpression><![CDATA[$F{block}]]></groupExpression>
<groupHeader>
<band height="22" isSplitAllowed="true" >

...
</groupHeader>
<groupFooter>
<band height="0" isSplitAllowed="false" >
...
</groupFooter>
</group>
<detail>
<band height="12" isSplitAllowed="true" >
...

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi, :)

 

 

no, not really. Of course I can set the value of the minHeightToStartNewPage quite huge, but this is not what I want.

 

 

I set for some group minHeightToStartNewPage="X"!

In which case the header of this group will be printed in the next page?

a)if the remaining vertical space of the current page is < X

b)if the remaining vertical space of the current page - band height of group header is < X

Link to comment
Share on other sites

robertsv wrote:

In which case the header of this group will be printed in the next page?
a)if the remaining vertical space of the current page is < X
b)if the remaining vertical space of the current page - band height of group header is < X

 

The answer is a) OR the remaining space < the group header declared band height.

 

Regards,

Lucian

Link to comment
Share on other sites

  • 1 month later...

Hi lucianc,

 

is there any oportunity to set minHeightToStartNewPage in IReport or from Java?

I mean not edit jrxml file with texteditor, but through transfer of parameters or i don't know..

 

Thanks! :lol:

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