0

我在Windows 7中使用Netbeans IDE 7.3.1我想在NetBeans中使用iReport-5.1.0 插件打印报告,但单击报告按钮后出现此错误:

net.Sf.jasperreport.engine.JRRuntimeException:Error creating SAX parser

这是我用来打印报告的代码,

private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {
    try {
        JasperDesign jd = JRXmlLoader.load("C:\\memoire\\report.jrxml");
        String sql = "select * from essai";
        JRDesignQuery newQuery = new JRDesignQuery();
        newQuery.setText(sql);
        jd.setQuery(newQuery);
        JasperReport jr = JasperCompileManager.compileReport(jd);
        JasperPrint jp = JasperFillManager.fillReport(jr, null, connect);
        JasperViewer.viewReport(jp);
    } catch (Exception e) {
        JOptionPane.showMessageDialog(null, e);
    }
}           
4

0 回答 0