gilbert_1 Posted June 21, 2013 Share Posted June 21, 2013 Hello all, am having problems deploying jasper reports in a web application. the problem is that the reports work fine when they are on my computer but as soon as their on a web app they stop working. My report has a subreport and that is were the problem lies. The "SUBREPORT_DIR" in the main report .jrxml is hard coded to my computer and will not work if I try it on another compuer or in a web app. I have found that other people have the same problem but I have not come across a solution that works for me. I would grately appreciate some assistance. I would like to be able to pass the "SUBREPORT_DIR" value from a java program but don't know how to do so. Thank you for your help Link to comment Share on other sites More sharing options...
Solution Thomas Zimmer Posted June 22, 2013 Solution Share Posted June 22, 2013 Have a look at the jasperreports source package. There are a bunch of examples, especially an example with two different ways to execute subreports:http://jasperreports.sourceforge.net/sample.reference/subreport/For general, you either have to pass a ready compiled subreport (object) e.g. in a parameter to your masterreport, or you will have to pass a valid subreport expression. This could for example be $P{SUBREPORT_DIR} + "mysubreport.jasper", where $P{SUBREPORT_DIR} has to be a valid path, accessible from your webapplication.Cheers, Thomashttp://www.thomaszimmer.net 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