Subreport not found during compile of main report

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>
incirlikhodja's picture
Joined: Dec 24 2009 - 6:34am
Last seen: 13 years 1 month ago

2 Answers:

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
darth_fader's picture
Joined: Mar 7 2010 - 9:45pm
Last seen: 3 months 3 weeks ago

Thanks!  That was the issue.  The default had been set to a value.  I cleared the value and all is well now.

incirlikhodja's picture
Joined: Dec 24 2009 - 6:34am
Last seen: 13 years 1 month ago
Feedback
randomness