When I attempt to compile my main report, the compiler fails saying that it cannot find my subreport. I receive the following error message: <see the message in the Code area>
Code: |
 Compiling to file... C:\\Documents and Settings\\jerry_dunn\\My Documents\\My Projects\\Subversion_Repository\\Redesign\\icps\\icps-web\\src\\web\\WEB-INF\\reports\\pt\\DD592SummaryReport\\DD592SummaryReport.jasper  Compiling subreports....  Unable to locate the subreport with expression: "$P{SUBREPORT_DIR} + "Garnishments01.jasper"". java.lang.Exception: C:\\ICPS\\src\\icps-web\\icps-web\\src\\web\\WEB-INF\\reports\\pt\\DD592SummaryReportGarnishments01.jrxml not found.     at com.jaspersoft.ireport.designer.utils.Misc.locateFileFromExpression(Misc.java:1373)     at com.jaspersoft.ireport.designer.compiler.IReportCompiler.compileSubreports(IReportCompiler.java:1403)     at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:508)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Compilation running time: 2,328! </td></tr></tbody></table> |
2 Answers:
Posted on November 9, 2010 at 4:00am
Have you double checked the value of SUBREPORT_DIR you're using? Consider putting your project in a path that doesn't contain spaces in the file names. Also, see my post on "Want a simple web app integration solution". I got fed up with handling resource references in jasper reports a long time ago. I came up with a solution for this problem: a resource locator that will find report resources (images, sub-reports, etc) without having to specify paths.
Post Edited by gertbeedfrobe at 11/09/2010 12:04