StevenCrawford Posted June 20, 2013 Share Posted June 20, 2013 Is it possible to detect the export format that is currently being used? I'm wanting to dynamically detect what export format is being used and show or hide report elements based on this.For example, if the user exports to PDF I wish to show a particular data table but if the instead export to CSV I do not. Link to comment Share on other sites More sharing options...
Solution Thomas Zimmer Posted June 20, 2013 Solution Share Posted June 20, 2013 Have a look at this:http://community.jaspersoft.com//questions/815695/how-hide-field-print-previewYou can use csv, xls, pdf and others instead of graphics2d in the example above. The elements you want to exclude must have the key <whatever4afilterUneed>You are also able to filter whole bands in a certain output format: http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.{format}.exclude.origin.{suffix}.{arbitrary_name}Cheers, Thomashttp://www.thomaszimmer.net Link to comment Share on other sites More sharing options...
StevenCrawford Posted June 20, 2013 Author Share Posted June 20, 2013 Awesome! Thanks Thomas! Haven't tried to implement yet but based of the property description this will save me tons of time. 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