Jump to content
We've recently updated our Privacy Statement, available here ×

Replicate subreport in iReport 3.5.1


psychic

Recommended Posts

Hi there,

I have researched iReport for 1 month. And now, i meet a problem with sub reports. I have one main report and 2 sub reports. I already put these 2 subreports in detail band, and they display successfull but they keep replicate themself (about 4,5 times). I already set each report Print Repeated Values = false.

Please help.

Best regards

Nguyen MInh Tam

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

The elements you place in the detail band are repeated as much times as iterations your datasource has.

For example, if you have a Database datasource and you define a query that returns 5 rows, the content of the detail will be repeated 5 times. I guess this is what is happening to you in that case. 

Regards.

Link to comment
Share on other sites

Workaround:

If you are using SQL and your subreports do not use the result of the main query as parameter, move the query from main report to another new subreport, so you will have 3 subreports and the main report becomes only a container.

In the "container" instead of the main query put something like "SELECT 1 FROM DUAL", this permits to print the detail band only one time with the content of all 3 subreports inside.



Post Edited by helyair at 06/18/2012 13:41
Link to comment
Share on other sites

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...