查看报告时遇到问题。首先,当我尝试点击'build'中excel按钮上的view按钮时。它不会查看报告,但它只是在文件夹中生成excel文件。其次,我可以在查看报告后获取.Jasper和.bak文件。
主要问题是我想直接查看excel的报告。错误显示: -
Exporting XLS to file (using POI)... .\senarai_cpp_4(1)_tnsparthis_pembaharuanPenangguhan.xls.
Error exporting print... Sheet name cannot be blank, greater than 31 chars, or contain any of /\*?[]
Can't find the translation for key = iReportCompiler.errorExportingPrint: using default (Error exporting print... {0} ) java.lang.IllegalArgumentException: Sheet name cannot be blank, greater than 31 chars, or contain any of /\*?[] at org.apache.poi.hssf.record.BoundSheetRecord.setSheetname(BoundSheetRecord.java:162) at org.apache.poi.hssf.model.Workbook.setSheetName(Workbook.java:464) at org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:540) at net.sf.jasperreports.engine.export.JRXlsExporter.createSheet(JRXlsExporter.java:147) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:393) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:221) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:1329) at java.lang.Thread.run(Unknown Source)
Export running time: 1,212
答案 0 :(得分:2)
旧版iReport使用过时版本的POI。该库无法截断excel的工作表名称。解决方案是将报告(jrxml)重命名为具有短文件名。
您可以转到工具 - >更改备份文件的位置。选项。