dtacker Posted April 24, 2023 Share Posted April 24, 2023 I have a report that I am building.The report has (3) detail bands. Each detail band has its own subreport.See image attached. When I run the report the subreports are printing on multiple pages multiple times. I can not figure out why this is happening.In image attached, "Barcodes", "reference jobs", and "colors" are all subreports. Notice how the PDF looks.Any help would be appreciated. Link to comment Share on other sites More sharing options...
Scott Andersen Posted April 24, 2023 Share Posted April 24, 2023 One copy of each of the three detail bands are generated for each row in the main query. To get a single occurrence of each sub report, put the subreport on the "Title" or "Summary" band. In your case I would put them on the "Summary" band. Link to comment Share on other sites More sharing options...
dtacker Posted April 24, 2023 Author Share Posted April 24, 2023 But how do you handle multiple subreports in a summary band? form what I've seen, as the first subreports returns more records, it will start to overlap the subreport below it. And correct me if I'm wrong but you can't add more than one summary band? Link to comment Share on other sites More sharing options...
dtacker Posted April 24, 2023 Author Share Posted April 24, 2023 Also, if I pull a subreport that only has one row of data returned, I'm still getting multiple copies printed. See new report that just has one row of data. Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted May 2, 2023 Share Posted May 2, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
psaripal Posted May 2, 2023 Share Posted May 2, 2023 Based on the attached pdf, each of the sub report is repeated 12 times. This is because the Main Report is binded to a dataset with 12 records. There are two options to solve the issue.1) Update the query on the MAIN report so that the dataset contains only one record.2) Move the Sub reports to Tile or Summary Bands as suggested by @dtacker. Resize the Summary Band to fit in all the subreports. This is cleaner apporach. Link to comment Share on other sites More sharing options...
Scott Andersen Posted May 18, 2023 Share Posted May 18, 2023 Make the subreport position relative to the previous subreport, not relative to the top of the band. 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