Jump to content
JasperReports Library 7.0 is now available ×

Dynamic height of PageFooter


coffeboy

Recommended Posts

Hello,

 

I've got the following problem:

I've got to print a report on paper letter paper where there is a 3.5cm x 3.5 cm box in the right lower corner. At the end of the report is a signature which needs about half of the page width. The signature has to be directly under a table of variable length (from few entries up to several pages). See also the following sketch: size=386]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/ReportSketch.png

When the table has few entries, the signature is above the box of the letter paper. When the table grows the signature is moved down. While the signature should only go on a new page when the buttom of the page is hit, the table should not grow into the box of the letter paper. Currently I've got a PageFooter that has the hight of the box on the letter paper but this also enforces the signature to go on a new page when it would be moved into the area of the page footer. Has anybody a solution for this problem?

 

regards

 

Jörg

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

For everybody who will encounter the same problem:

I've solved the issue by modifying the JasperPrint object. I'll check if there are more then two pages and then if the last page has only one text element. If there is only one text element I remove it from the last page, delete the last page, and search the table to put the signature under.

To keep this code out of my program I put it in the scriptlet and derived the scriptlet from my own base class. Whenever a report is print I'll now check if there is a scriptlet and if it extends my base class. If it does the modifying method is called.

Link to comment
Share on other sites

Strange description of your problem.

 

Don't put Table and SignatureField into one band.

Use another band for the signature. (e.g. the summary) this is printed always at the end of the report.

 

if the pagefooter is the same height as your static box it will never happen, that the signature is below or at the same y-pos as your box.

 

I would not modify the result JasperPrint Object as you must also consider changing calculated variables (total amount of pages/sums etc)!

 

hth

C-Box

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