fachhoch Posted July 13, 2009 Share Posted July 13, 2009 We are using Ireport to create .jrxml .Ireport creates the parameter SUBREPORT_DIR , Our application we place all the jrxml files inside one package , Is there any value which tells jasper reports the subreport_dir is the same directory where the parent report is ? Link to comment Share on other sites More sharing options...
Teodor Danciu Posted July 14, 2009 Share Posted July 14, 2009 Hi, I replied you on this other thread here:http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=60049 But I would add only one thing about this particular question you asked here.If all the reports are all in the same folder, we could indeed locate them using their relative location to each other, but this would work only if you would load the master report using a file based fill method, not an InputStream based method.If you run a report using its filename, we know where that file is, and we can locate the subreports based on their relative location to the master, thanks to a default file resolver instance that we create. But if you run them after being loaded from InputStream, we don't kwno where the report was on disk so we cannot locate its subreports because there is no notion of base folder to start with. We could only load them based on their relative location within classpath. So you first need to decide how do you want to load the master (as file or InputStream) and then you chose your subreport referencing mechanism based on that. I hope this helps.Teodor 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