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

Page break using 'isStretchWithOverflow'


Recommended Posts

By: Gabriel - acharat

Page break using 'isStretchWithOverflow'

2003-05-09 12:49

I have a problem. When I generate a PDF from my report the page breaks after the correct page height.

 

The problem is that I'm using the 'isStretchWithOverflow' in all textfields. If the fields don't overflow then the page breaks ok, but if they overflow then the pages breaks wrong.

 

Any idea?

 

Thank you.

Acharat

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Page break using 'isStretchWithOverflow'

2003-05-09 13:02

 

Hi,

 

You have to give more details about your problem

if you want to get quick and helpful answers.

 

You tell that something is wrong, but what exactly?

 

Thank you,

Teodor

 

 

 

 

 

By: Gabriel - acharat

RE: Page break using 'isStretchWithOverflow'

2003-05-09 13:25

Hi,

 

I'm sorry. I will try to explain better:

 

The detail band heigth fills all the page.

 

If any text field overflows to more than one line, then one record feets exactly one page.

 

But if the textfields overflow then I have:

 

first page - fill ok

 

second, third, fourth, ... page - fill only to the middle of the page and then break.

 

 

Thank you.

Acharat

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Page break using 'isStretchWithOverflow'

2003-05-09 13:36

 

Hi,

 

OK, that's better. At leat we know what we are

talkin about.

 

I think you have a very large detail band.

It seems to be so large than only one such

detail could fit on the page.

 

The problem is that when this large detail happens

to overflow due to some stretching text fields inside,

it will consume space on the next page and the

remaining space there is not sufficient for the

engine to start with the next detail. It introduces

a page break and then continues. This way, the

remaining space that was not sufficient stays blank

(seems to be wasted).

 

This is how the engine works. It always introduces

page or column breaks if the remaining space on

the current page or column is not at least equal

or greater than the declared height of the current

band that it has to generate.

 

Bu the solution exists. You just have to help it

a little and split those large bands which are not

quite recommended.

 

Please consider this trick:

 

http://jasperreports.sourceforge.net/tips.tricks.html#largebands

 

Thank you,

Teodor

 

 

 

 

 

By: Gabriel - acharat

RE: Page break using 'isStretchWithOverflow'

2003-05-12 10:14

Hi,

 

Thanks for the reply, I think you understood my problem.

 

We redistributed the textfields that were in the detail band, into a new group bands (header and footer), but the problem with the page break continues.

 

I think the link you put in your reply talks about add more text fields than the page size (design), but it not talks about page break when the textfields stretch.

 

Do you have any other idea?

 

Thank you again,

Acharat

 

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Page break using 'isStretchWithOverflow'

2003-05-12 12:44

 

Hi,

 

If you have split the detail band only in two pieces,

using the header and footer section of a single

dummy group, you still have what is called

"large bands" as each one of those is half a page tall.

 

When splitting a band we are talking in fact about

letting the reporting engine know where it would

be acceptable for us to have a page break.

The engine will never start to print a band if the

remaining space on the current page/column is

not sufficient for the declared band height.

The problem with large bands is that is more

difficult to find available space for them on the

page and they tend to generate page only for themselves to fit it.

They are so demanding in terms of space.

 

Split them as much as you can, not only in half.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

  • 9 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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