Jump to content
We've recently updated our Privacy Statement, available here ×

Using filters to exclude CSV headers, title, pagination in JasperReportsLibrary 6.19


bryan.moore

Recommended Posts

 

We had some code that was working in Jasper Reports Library 4.5, which used filters that were set on the exporter to exclude headers, title... from CSV output: 

JROriginExporterFilter filter = new JROriginExporterFilter();
                filter.addOrigin(new JROrigin(BandTypeEnum.PAGE_HEADER));
                filter.addOrigin(new JROrigin(BandTypeEnum.PAGE_FOOTER));
            
                filter.addOrigin(new JROrigin(BandTypeEnum.TITLE));
                exporter.setParameter(JRExporterParameter.FILTER, filter);

This code is no longer working when we upgraded to Jasper Reports Library 6.19.1.   It appears that JRExporterParameter is deprecated, and the way to do this is to set a configuration object on the exporter: 

exporter.setConfiguration(ExporterConfiguration); 

Though, I only see a way to get a filter on the configuration, but not set it?   

https://jasperreports.sourceforge.net/api/net/sf/jasperreports/export/ReportExportConfiguration.html

ReportExportConfiguration  getExporterFilter() 

How can I use this same JROriginExporterFilter in order to exclude title, headers, pagination... for CSV exports in 6.19.1?  

Thanks!

-Bryan

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
 

Link to comment
Share on other sites

  • 3 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...