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

Set IS_IGNORE_PAGINATION true for Excel and false for PDF


SomasundaramVT

Recommended Posts

I have a jasper report which I export to PDF and Excel, as of now I am using only one jasper. I want the PDF exported report should be "isIgnorePagination=''true" and for Excel report should be "isIgnorePagination = 'false' "?


How to set from java code?


I am using JasperSoft Studio 6.2.1 version for development and testing. From searching in the web I can see that I need to extend some class in jasper reports and write the below code. But I am not sure to extend which class and override method. It would be helpful i you can share some code in full as i still in learning phase.


if (report format is xls) {

            params.put(JRParameter.IS_IGNORE_PAGINATION, Boolean.TRUE);

        }

        else if (report format is pdf) {

            params.put(JRParameter.IS_IGNORE_PAGINATION, Boolean.FALSE);

        }


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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