psychic Posted June 18, 2012 Share Posted June 18, 2012 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 regardsNguyen MInh Tam Link to comment Share on other sites More sharing options...
augarte Posted June 18, 2012 Share Posted June 18, 2012 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 More sharing options...
federico.cattozzi Posted June 18, 2012 Share Posted June 18, 2012 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 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