Set IS_IGNORE_PAGINATION true for Excel and false for PDF

0

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);
        }

SomasundaramVT's picture
Joined: Mar 30 2017 - 8:43am
Last seen: 2 years 1 month ago

0 Answers:

No answers yet
Feedback
randomness