dtrobert Posted July 27, 2009 Share Posted July 27, 2009 Hi, I just today tried the newer iReport type (3.5.2 vs 3.0.0). The one thing that hit me right away is that is no longer allows me to right clicking on a subreport element to open the subreport. The option is there but it doesn't do anything. Now, I do use a $P{reportbinder}/templates/myreporttemplate.jasper as the definition. $P{reportbinder} is defined by our application. For whatever reason, it used to work fine in the old version but now not. Any thoughts?Thanks! Link to comment Share on other sites More sharing options...
dtrobert Posted September 28, 2009 Author Share Posted September 28, 2009 Just tried with iReport 3.6.0 and same issue although I thought it was fixed. When I right click to open subreport I get error: "Unable to open subreport: The subreport expression returned null. I'm unable to open the subreport jrxml :-(" My subreport expression is: $P{reportsPath} + "templates/compiled/RoutePlan_CallHandling_List2.jasper" where $P{reportsPath} gets passed in at runtime. Again, this works perfectly fine with iReport 3.0.0. Link to comment Share on other sites More sharing options...
walmillard Posted September 29, 2009 Share Posted September 29, 2009 You might find if you set your $P{} "Default Value Expression" value to your test path so that it will, when combined with the string part make up the whole absolute path correctly the right clicking will work. iReport will check the file name given in the subreport expression with the relative root of the master report then with the absolute path of the master report. Becuase you use a sundirectory in the string part (of the path to your subreport) this will fail in your case. i use a similar expression however my $P{} is the whole path. so while you may need something like"c:\\projects" (or what ever comes before "/templates") to make an absolute path. i only need an empty string ie "" and iReport finds my subs. luck! ALSO NOTE "\\" is the delimited MS Windows separator "\" or backslash. You may need to check that if you are running on Non Windows OS. Post Edited by walmillard at 09/29/2009 02:18Post Edited by walmillard at 09/29/2009 02:19Post Edited by walmillard at 09/29/2009 02:23 Link to comment Share on other sites More sharing options...
dtrobert Posted October 5, 2009 Author Share Posted October 5, 2009 Thanks but my main point is the behavior from 3.0.0 is different and I have hundreds of templates so I'd prefer to not have change and re-QA them all just to use the latest iReport. I remember a developer saying he changed the behavior so it would work as good as 3.0.0 but looks like still not quite. 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