eloh Posted October 26, 2006 Share Posted October 26, 2006 Hi all, I add the following code to see if it works, but I get the exception: JExcelApiExporter exporter = new JExcelApiExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, file.toString() + ".xls"); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); exporter.exportReport(); //I also try to use JExcelApiExporterParameter, but I still get the exception //exporter.setParameter(JExcelApiExporterParameter.JASPER_PRINT, jasperPrint); //exporter.setParameter(JExcelApiExporterParameter.OUTPUT_FILE_NAME,file.toString()); //exporter.exportReport(); Here is the exception:java.lang.NoSuchFieldError: IHDR at com.keypoint.PngEncoderB.writeHeader(PngEncoderB.java:260) at com.keypoint.PngEncoderB.pngEncode(PngEncoderB.java:185) at com.keypoint.PngEncoderB.pngEncode(PngEncoderB.java:208) at net.sf.jasperreports.engine.export.JExcelApiExporter.loadImageDataFromAWTImage(JExcelApiExporter.java:620) at net.sf.jasperreports.engine.export.JExcelApiExporter.exportImage(JExcelApiExporter.java:595) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:356) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:246) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:154)Would you mind to help me out. Thanks in advance.Eva Link to comment Share on other sites More sharing options...
lucianc Posted October 30, 2006 Share Posted October 30, 2006 You seem to have conflicting versions of com.keypoint.PngEncoderA and com.keypoint.PngEncoderB on your classpath. If you have a jar named png-encoder-* on your classpath, move it at the beginning of the classpath. Otherwise, inspect all the jars on the classpath and see which contains these classes. HTH,Lucian 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