C
CD1
Hi guys!
I'm trying to use JasperReports rather than JFreeReport, because
there's iReport and it makes the work easier for me
I made a basic report on iReport, compiled, ran and everything (under
iReport). When I try to run it under my program (the code will follow),
it doesn't work. Here's what happens:
try {
String FILE = "report.jrxml";
JasperReport report = JasperCompileManager.compileReport(FILE);
JasperPrint printed_report =
JasperFillManager.fillReport(report, null, someConnection);
JasperViewer.viewReport(printed_report);
}
catch (JRException excecao) {
System.out.println("Error: " + excecao.getMessage());
}
Error: Parse Warning at line 1 column 0: URI was not reported to parser
for entity [document]
org.xml.sax.SAXParseException: URI was not reported to parser for
entity [document]
The report starts like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
..../>
What's wrong?? It compiles fine under iReport, but when I try, it
doesn't. The classpath is right (I think...): the
common-[beanutils|logging|digester|collections], itext... I think these
are the needed files.
Thanks for any help
I'm trying to use JasperReports rather than JFreeReport, because
there's iReport and it makes the work easier for me
I made a basic report on iReport, compiled, ran and everything (under
iReport). When I try to run it under my program (the code will follow),
it doesn't work. Here's what happens:
try {
String FILE = "report.jrxml";
JasperReport report = JasperCompileManager.compileReport(FILE);
JasperPrint printed_report =
JasperFillManager.fillReport(report, null, someConnection);
JasperViewer.viewReport(printed_report);
}
catch (JRException excecao) {
System.out.println("Error: " + excecao.getMessage());
}
Error: Parse Warning at line 1 column 0: URI was not reported to parser
for entity [document]
org.xml.sax.SAXParseException: URI was not reported to parser for
entity [document]
The report starts like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
..../>
What's wrong?? It compiles fine under iReport, but when I try, it
doesn't. The classpath is right (I think...): the
common-[beanutils|logging|digester|collections], itext... I think these
are the needed files.
Thanks for any help