Jump to content

looping for subreports


jo_atman

Recommended Posts

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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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

  • 5 years later...

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

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...