kgoedert Posted December 27, 2007 Share Posted December 27, 2007 Hi, I have a master report which has a subreport which in turn has another subreport. I my master report, I have a list of beans of class A that have a list of beans of class B that are shown in the subreport and beans of class B have a list of beans of class C that should be shown in the subreport's subreport. I can show properties of class' A objects with no problem and the first subreport also has no problem. I pass the properties from the master report to the subreport through a list and everything works just fine. Which doesn't work is passing parameters from the subreport (which shows properties of B objects) to the subreport within it (which should show properties of C objects). In my java code I have this:Code:InputStream c = getClass().getClassLoader().getResourceAsStream(ReportManager.REPOSITORY + "c.jasper"«»); InputStream b = getClass().getClassLoader().getResourceAsStream(ReportManager.REPOSITORY + "b.jasper"«»); InputStream main = getClass().getClassLoader().getResourceAsStream(ReportManager.REPOSITORY + "main.jasper"«»); param.put("subRelPath", b); param.put("subScalePath", c); try { print = JasperFillManager.fillReport(main, param, ds); return JasperExportManager.exportReportToPdf(print); } catch (JRException e) { e.printStackTrace(); } In my main report, in the subreport properties I pass a parameter that represents the collection it should show, and I do the same on this subreport to the subreport within it. And this doesn't work. What is wrong? Why can I pass a collection from the master report to its subreport and it works fine, but it doesn't work when passing from one subreport to a subreport within it? Thanks for any help 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