i have a jasperreport with some subreports. I want to store the .jasper files inside the classpath.
Actually my reports are in com/myapp/reports.
I can successufly load the main report with this path:
private static String D1_PACKAGE = "/com/myapp/report/d1.jasper";
...
InputStream reportD1 = ReportProvider.class.getResourceAsStream(D1_PACKAGE);
bytes = JasperRunManager.runReportToPdf(reportD1, params, new JREmptyDataSource());
But the problem is when it looks for subreports. They are in the folder but i tried to change the param SUBREPORT_DIR with one of these path but no one works:
./
/com/myapp/report
com/myapp/report