Jump to content
JasperReports Library 7.0 is now available ×

guilherme_ls

Members
  • Posts

    2
  • Joined

  • Last visited

guilherme_ls's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I can get the Autofilter to work when I run a report in JasperSoft Studio, however when I run the same report from JasperReports Server, the Autofilter does not appear. Is there any special configuration I need for Autofilter to work from JR Server? Im using JasperSoft Studio 6.1 and JasperReport Server 6.0.1 import java.io.File; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.export.JRXlsExporter; import net.sf.jasperreports.engine.export.JRXlsExporterParameter; import net.sf.jasperreports.engine.util.JRLoader;public class Report { public void generateReport() throws JRException, Exception { /*JasperPrint generated from JasperReport Server*/ /*http://192.168.1.106:8080/jasperserver/rest_v2/reports/reports/{jasperReport}.jrprint*/ File file = new File ("/home/{user}/Desktop/{file}.jrprint"); JasperPrint jasperPrint = (JasperPrint) JRLoader.loadObject(file); File destFile = new File("/home/{user}/Desktop/{file}.xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString()); exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN,Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_GRAPHICS,Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS,Boolean.TRUE); exporter.exportReport(); /*that is working*/ } }[/code]
  2. Created a jrxml with iReport, but the AutoFilter setting is lost in JasperServer.
×
×
  • Create New...