arianhojat Posted September 26, 2007 Share Posted September 26, 2007 Ive seen in message boards a couple times that someone will say in your java apps to pass the subreport location in a parameter with parameters.put( 'sub1', application.getPath('/reports/myreport.jasper')) so the full path to the subrepotr file is passeed as a paremter to get the subreport name and therefore found, or somehow just in the jrxml use the path relatively so both find it?. But i am unsure how to get it to work so if user is viewing NOT from my java app but from Ireports. Hence 1st method wont work. I need to make it work with both. Link to comment Share on other sites More sharing options...
arianhojat Posted September 28, 2007 Author Share Posted September 28, 2007 i think i will set a param in main jrxml file for each subreport. The params default value will be for example sub1.jasper or the full absolute filepath, both would work (prefer relative in case move the file somewhere).If run from iReports this default is the value it will use. my tomcat app can supply in parameters to the report a absolute filepath which is based on relative location. So like the report files are all under tomcat/webapps/jasper/reports. Ireport user has access and can open a report from reports.The tomcat app, which is in /jasper, can find the file like so: parameters.put("sub1",application.getRealPath("/reports/sub1.jasper")); Hence both can find file appropriately theoretically (didnt try yet, just writing down idea :) ). Not sure why the boards are so dead here for vastly used product. Frustrating. 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