CharleyDC5 Posted August 25, 2009 Share Posted August 25, 2009 Hi folks,I just installed the new version of iReport (3.5.3) and tried the new automatic subreports compilation feature.I always get the following message:"Unable to locate the subreport with expression: "$P{BaseDir} + "mysubreport.jasper"".Things I have tried : 1. <subreportExpression class="java.lang.String"><![CDATA[$P{BaseDir} + "mysubreport.jasper"]]></subreportExpression>2. <subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "mysubreport.jasper"]]></subreportExpression>3. <subreportExpression class="java.lang.String"><![CDATA["mysubreport.jasper"]]></subreportExpression>Important notes : My report and subreports are located in the same package/directory. For instance : Master report file : C:\eclipse\workspace\MYPROJECT\web\reports\myreport\test.jrxml Subreport file : C:\eclipse\workspace\MYPROJECT\web\reports\myreport\mysubreport.jrxml BaseDir and SUBREPORT_DIR parameters are set to ""Any idea?Thank you very much for helpCharles Link to comment Share on other sites More sharing options...
SOYHU Posted August 27, 2009 Share Posted August 27, 2009 my SUBREPORT_DIR is setDefault Value Expression = "C:\\honda\\hatc_boss_rep\\Real\\"see my attached file. Link to comment Share on other sites More sharing options...
CharleyDC5 Posted August 27, 2009 Author Share Posted August 27, 2009 Yes I understand that. My iReport reports are bundled in a Java J2EE web application, so I can't use a physical path. Otherwise, my web app will search for the folder "C:\\honda\\hatc_boss_rep\\Real\\" (for example), which is not existing on my jboss production environment. Every other report works like a charm. I'm just facing that problem with one report... Link to comment Share on other sites More sharing options...
SOYHU Posted August 28, 2009 Share Posted August 28, 2009 I ever use "Option -->> Complilation and execution " to complie jrxml code and deploy to Websphere work sapce both report and sub report (ireport 2.XX ), it's ok Have you tried its? Link to comment Share on other sites More sharing options...
JSquire Posted August 28, 2009 Share Posted August 28, 2009 so your file locations should then be in your classpath in which case just remove $P{BaseDir}so the expression class should be string and value="mysubreport.jasper"if you dont specify the location jasper will look in the same location as the parent report and if not found it will then search your class path. Link to comment Share on other sites More sharing options...
CharleyDC5 Posted August 31, 2009 Author Share Posted August 31, 2009 SOYHU,This option is already checked in my ireport configuration :(As I said, I have this problem with only one report. I understand why... I will try to create a new jrxml file and then copy the XML code into it. JSquire,You mean iReport classpath or application classpath? Thanks for help! Link to comment Share on other sites More sharing options...
JSquire Posted September 1, 2009 Share Posted September 1, 2009 application classpath - the ireport classpath is not in the jrxml and wont be in the compiled .jasper binary. Link to comment Share on other sites More sharing options...
rajuchacha007 Posted August 26, 2010 Share Posted August 26, 2010 @CharleyDC5 Hello, I am having the same problem. Would you please let me know how did you find the solution? Thank you in advance. Link to comment Share on other sites More sharing options...
CharleyDC5 Posted August 27, 2010 Author Share Posted August 27, 2010 Well, I think that problem has been fixed in the next few versions of iReport. Link to comment Share on other sites More sharing options...
rajuchacha007 Posted August 31, 2010 Share Posted August 31, 2010 issue resolved. moved $P{SUBREPORT_DIR} from the default expression and it worked. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now