jo_atman Posted September 27, 2006 Share Posted September 27, 2006 Hi all,basically i have a list of elements that a user can choose from, and each element has its own subreport.So i end up with a list of subreports. The question is:is there something like creating a loop within my main report jrxml which i can call for the list of subreports?Alternatively, if the number of subreports that will be in the main report is dynamic, how do i incorporate this variable number of subreports in my main report?Thanks,Nilesh Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted September 27, 2006 Share Posted September 27, 2006 Could you clarify this question please? I am not sure what your asking... Link to comment Share on other sites More sharing options...
jo_atman Posted September 28, 2006 Author Share Posted September 28, 2006 Okay, to clarify:usually, if a report has, say, 3 subreports within it, i'll have ...<detail> <band> <subreport> ... </subreport> <subreport> ... </subreport> <subreport> ... </subreport> </band></detail>... What i'm doing is passing in as a parameter, a List of subreports. It can have anywhere from 1 to 9 subreports in there.So i don't know statically how many subreport sections to add in the report beforehand.so how do i dynamically add as many subreport sections as the size() of my List?Hope that helps. I was hoping to use the <printWhenExpression>, but i'm not sure how to use it to skip <subreport> sections... Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted September 28, 2006 Share Posted September 28, 2006 Could you use a custom data source and group by these sub-reports? I am sorry to say I still can't "envision" your design and what your goal is. You would create 'n' sub-reports programaticially then pass those to the main report as parameters which should be used as sub-reports? Link to comment Share on other sites More sharing options...
jeffcaswell Posted April 24, 2012 Share Posted April 24, 2012 I have the same question, and don't understand why it is so difficult to understand. Can you have a dynamic list of subreports, or do they (does the number of subreports) have to be pre-defined and fixed? Can you generate a master report with 1 subreport, or one hundred subreports, depending on the situation? Link to comment Share on other sites More sharing options...
Java_Jasper Posted October 8, 2013 Share Posted October 8, 2013 You are correct, you would need to use the PrintWhenExpression. If you are not sure how to declare a statement then you will want to look into it. Thus you would use a print when said paramater is true else don't. 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