dogfuel Posted October 14, 2011 Share Posted October 14, 2011 Is there a parameter from which I can determine the output viewer of a report being run or exported? I would like to hide certian bands with a "print when" if a report is being output to excel.thanks!!! Link to comment Share on other sites More sharing options...
mgeise Posted October 19, 2011 Share Posted October 19, 2011 The creation of the JasperPrint object and the export to the desired format happen at different times. At the time that the print when expression is evaluated, I don't think the export format is really decided yet. The option you can use is to leverage the jasperreports properties setting to exclude the band for the specific output...this provides the appropriate hint to the exporter. See the net.sf.jasperreports.export.{format}.exclude.origin.{suffix}.{arbitrary_name} setting. There is also a keep.first version that allows you to eliminate the band, except for the first one so that you can show the column header and page header bands only once in excel output. http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.{format}.exclude.origin.{suffix}.{arbitrary_name} 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