kburns Posted June 1, 2011 Share Posted June 1, 2011 I am using jasper server 4.x and trying to export to XLSX. This option is available in the jasper server interface, however in Argument.class I do not see it: public static final java.lang.String RUN_OUTPUT_FORMAT_PDF = "PDF"; public static final java.lang.String RUN_OUTPUT_FORMAT_JRPRINT = "JRPRINT"; public static final java.lang.String RUN_OUTPUT_FORMAT_HTML = "HTML"; public static final java.lang.String RUN_OUTPUT_FORMAT_XLS = "XLS"; public static final java.lang.String RUN_OUTPUT_FORMAT_XML = "XML"; public static final java.lang.String RUN_OUTPUT_FORMAT_CSV = "CSV"; public static final java.lang.String RUN_OUTPUT_FORMAT_RTF = "RTF";Any insight on this? Link to comment Share on other sites More sharing options...
kburns Posted September 16, 2011 Author Share Posted September 16, 2011 To answer my own question, I implemented like so. JasperPrint print = client.runReport(rd, reportInputMap); .... bunch of code .... JRAbstractExporter myExporter; .... bunch of code .... myExporter = new JRXlsExporter(); response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); myExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, response.getOutputStream()); myExporter.setParameter(JRExporterParameter.JASPER_PRINT, print); myExporter.exportReport(); 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