charioteer7 Posted March 9, 2016 Share Posted March 9, 2016 This is a Jasper Reports Java API question: I am trying to add a parameter that will be accessible to the report after the JasperFillManager has created the JasperPrint object.I want certain things conditionally printed on the report depending on the export format: PDF, XLS, etc. But the report is filled and baked on one screen, and then the user chooses the report format on another screen before the exporter exports it. I cannot see the original parameters that were put into the report before the JasperPrint object was created and can find no way to add another param.I tried jasperPrint.setProperty(), SimpleReportContext.setParameterValue(), then put context into exporter. None of these parameters are visible in a print when expression.Any ideas, other than get the format type at the outset from the user? Many Thanks in advance. Link to comment Share on other sites More sharing options...
hozawa Posted March 9, 2016 Share Posted March 9, 2016 jasperprint is a static format and can not be change. If you have to change it, export it some other format like xlsx and filter that and use that as a datasource to regenerate jasperprint. 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