Note that there are some explanatory texts on larger screens.

plurals
  1. POreport in excel from Jasper
    text
    copied!<p>While generating report in excel, following error message are shown. Please help!!!</p> <p>Code:-</p> <pre><code>public String mainReportXLS(){ Map&lt;String, Object&gt; jrxmlParams = null; try{ String jrxmlFileName = "C:/Jasper/Dashboard2.jrxml"; JasperReport objJReport = JasperCompileManager.compileReport(jrxmlFileName); connection = getConnection(); JasperPrint print = JasperFillManager.fillReport(objJReport, jrxmlParams, connection); ByteArrayOutputStream outputByteArray = new ByteArrayOutputStream(); //OutputStream outputfile= new FileOutputStream(new File("c:/output/JasperReport.xls")); JRXlsExporter exporterXLS = new JRXlsExporter(); exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, print); exporterXLS.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "C:/Jasper/Dashboard2.xls" ); exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, outputByteArray); exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE); exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporterXLS.exportReport(); //outputfile.write(outputByteArray.toByteArray()); }catch (Exception e) { System.out.print("Exceptiion" + e); } return null; } </code></pre> <p>Error Message viewed:--</p> <pre><code>]] Root cause of ServletException. javax.faces.FacesException: Error calling action method of component with id headerForm:Report123456 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72) at javax.faces.component.UICommand.broadcast(UICommand.java:109) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171) at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32) Truncated. see log file for complete stacktrace Caused By: javax.faces.el.EvaluationException: Exception while invoking expression #{ReportsBB.extractJasper} at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61) at javax.faces.component.UICommand.broadcast(UICommand.java:109) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171) Truncated. see log file for complete stacktrace Caused By: java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFWorkbook.getCreationHelper()Lorg/apache/poi/ss/usermodel/CreationHelper; at net.sf.jasperreports.engine.export.JRXlsExporter.openWorkbook(JRXlsExporter.java:282) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:879) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:629) at com.ultimatix.dealpricing.dao.ReportsDAO.mainReportXLS(ReportsDAO.java:137) at com.ultimatix.dealpricing.backingbeans.ReportsBackingBean.extractJasper(ReportsBackingBean.java:293) Truncated. see log file for complete stacktrace &gt; </code></pre> <p>Can any one pls help..!!!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload