coffeboy Posted January 10, 2008 Share Posted January 10, 2008 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.pngWhen 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 More sharing options...
coffeboy Posted January 15, 2008 Author Share Posted January 15, 2008 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 More sharing options...
C-Box Posted January 15, 2008 Share Posted January 15, 2008 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)! hthC-Box Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now