0

I am using Netbeans IDE 7.3.1 in Windows 7 I want to print a report using iReport-5.1.0 plugin in NetBeans but I get this error after click to the Report button:

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

This is the code I am using to print the report,

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);
    }
}           
Alex K
  • 22,315
  • 19
  • 108
  • 236
fofo
  • 1
  • 4
  • your database conenction is working well? if you post more exception code will be easier. – ZaoTaoBao Sep 27 '13 at 07:33
  • @fofo `I get this error after click to the Report button:` - What is it? Is it yours button? Is code you posted related with this button? – Alex K Sep 27 '13 at 08:16
  • Hi Alex K? Yes my connection is well, this is the error I get net.Sf.jasperreport.engine.JRRuntimeException:Error creating SAX parser, yes the code is related – fofo Sep 27 '13 at 09:23
  • Hi ZaoTaoBao?, yes my connection is working well – fofo Sep 27 '13 at 09:29
  • @fofo You can look at [JasperReports: Getting JRRuntimeException: Error creating SAX parser](http://stackoverflow.com/q/17715967/876298) & [Error creating SAX parser from JasperReports](http://stackoverflow.com/q/16005750/876298) posts – Alex K Sep 27 '13 at 09:41
  • Hi,I'm using what I get to this link this error is gone but I do not see data on the page now I get this error the document has no pages http://stackoverflow.com/questions/16005750/error-creating-sax-parser-from-jasperreports – fofo Sep 27 '13 at 10:06

0 Answers0