madhukiran Posted January 13, 2010 Share Posted January 13, 2010 I am using a single jrxml which executes to give both pdf and excel outputs..Now I do not want certain fields bands to print when the report is excel. Is there any way to do this??P.S. I am passing the parameter IS_IGNORE_PAGINATION as true when running excel reports. So,I have give the print when expression to the fields to be hidden during excel generation asnew Boolean(IS_IGNORE_PAGINATION.toString().equals("false")... but my doubt here is, does IS_IGNORE_PAGINATION default to false or null??? I can see that it is an in built parameter and it should default to false .. but just wanted to confirm.... Link to comment Share on other sites More sharing options...
lshannon Posted January 13, 2010 Share Posted January 13, 2010 When you say "I do not want certain fields bands", is it a band or a field you wish to hide in the output?Are you hosting this report in your own application or JasperServer? If it is your own, you should be able to detect when the user has chosen an excel output. Then you can declare a boolean Parameter in your design, which could be named something like OUTPUT_IS_EXCELL. This would be false by default, however when you detect a user wants Excel, you could set it to be true.Using this parameter to you can create PrintWhenExpressions to both bands and fields to your design.As to your other question, I took a quick peak at the source and it looks like in the JRBaseFiller class there is a method called setIgnorePagination that sets the value of the parameter to Boolean.FALSE if it is not true. Link to comment Share on other sites More sharing options...
madhukiran Posted January 25, 2010 Author Share Posted January 25, 2010 Thanks for the reply.. I need to hide the page footer and a logo field in the header actually.. and im using my own application and not a jasperserver... I ignore pagination only when i export to excel.. so instead of adding a parameter like OUTPUT_IS_EXcel il use ignore pagniation itself in my case .. thanks for the help by confirming that ignore pagination is set to false if not true!! 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