I have to make a JasperReport on serverside (Tomcat + gwt).
I try to run a hello-world
public class AuthorReport {
public static void generate() {
try {
String reportSource = "resources/authorReport.jasper";
JasperReport jasperReport = JasperCompileManager
.compileReport(reportSource);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
new HashMap(), new JREmptyDataSource());
JasperExportManager.exportReportToHtmlFile(jasperPrint, "hello_report.html");
} catch (Exception e) {
e.printStackTrace();
}
}
}
I get no exceptions, but I cant realise where is the generated file and whether it is generated at all.
Maybe I do have to integrate somehow Tomcat and JasperReports?
You have to specify this location in the second parameter of JasperFillManager.fillReport.
Good luck!