外线:
net.sf.jasperreports.engine.JRException: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException
我用
Netbeans 7.2的Netbeans 7.2 + iReport插件(iReport4.7.1) 使用该插件适用于netbeans,但在运行问题时 库:
代码:
try{
String rutaReport = "src\\PckReports\\rBoleta.jasper";
Map param = new HashMap();
param.put("numComprobante",txtCorrelativo.getText());
param.put("numSerie",txtSerie.getText());
param.put("tipoComprobante", bol);
param.put("numLetra",letra);
JasperReport lReporte = JasperCompileManager.compileReport(rutaReport);
//JasperReport lReporte = JasperCompileManager.compileReport("PckReports\\rBoleta.jrxml");
JasperPrint jasp = JasperFillManager.fillReport(lReporte, param, this.jcn.Con());
//JasperExportManager.exportReportToPdfFile(jasp, "D:\\InformePaisesMySQL.pdf");
JasperViewer ventana = new JasperViewer(jasp,false);
ventana.setTitle("Boleta de Venta -"+fechaEmisionBol());
ventana.setVisible(true);
}catch(HeadlessException | JRException ex){
JOptionPane.showMessageDialog(null, ex);
System.out.println(""+ex);
}
答案 0 :(得分:0)
您可能正在尝试将Jasper二进制文件(rBoleta.jasper)编译为Jasper(XML)源。
尝试
String rutaReport = "src\\PckReports\\rBoleta.jrxml";
JasperReport lReporte = JasperCompileManager.compileReport(rutaReport);