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

Dynamic page height to show 10 records per page with StretchWithOverflow property set to true


saurabhmca2003

Recommended Posts

I have 10 records per page (9 columns) in jasper using page break property. I have set StretchWithOverflow property to true for my detail band. So, when there is more data, my table gets enlarge vertically.
My problem is, if the data is more, it is not showing 10 records per page because in jasper we give static height of the page.

If i set more height of the page, then in that case if data is less, there is lots of invalid space on the report. Please help if someone faced this issue.

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks for quick response. I have already set this property. My issue is when my data in one cell have more characters, it goes to the next line and height of that row got extended (used property StretchWithOverflow).

Now, my records per page got disrupted (8-9 record per page) because one cell has been increased vertically. Please do let me know if the problem is clear..

Link to comment
Share on other sites

Looks like you need to move pagebreak between 8-10 records. You probably will need some kind of calculation how many records you generated so far. Are you really sure you need the page break? maybe you can trust default settings to manage it for you?

Just set "Print in first whole band" to avoid broken lines.

Link to comment
Share on other sites

Tried 'Print in first whole band' with no luck..

 

Want to elaborate my problem again in detail:

 

I have one jasper report 9 columns (col1, col2...col9) in a page. Data in individual cells coming dynamic from database. I have set 10 records per page (using Page Break) and set some static height of the report.

 

Now, I noticed that in col2 some characters cut off (width issue). To resolve this width issue, I set 2 properties i.e., Stretch With Overflow & Stretch type. Now, my col2, data have been wrapped fine.

 

Now there is no issue in display of data. The main concern is, since col2 have more data and height of the page is already set statically, my 10th record is moving to 2nd page. So what I want is to set te page height dynamic instead of mentioning that static.

 

Please do let me know if this make sense.

Link to comment
Share on other sites

  • 2 weeks later...

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