1
votes

I am working on a report that needs to contain on a page 3 images inserted from the database. I created a subreport with the query that returns the images identified (maximum 3) by the parent's id, but I am unable to make the report insert them on the same page. If I add three image blocks it prints on the first page the first image x3, the second page, second image x3 and so on.

Basically I want to achieve the following:

Select * from img where parent.id=x => returns images with id 1,2,3; Then on the same page:

  • image block 1 -> photo with id 1
  • image block 2 -> photo with id 2
  • image block 3 -> photo with id 3

Thanks in advance!

1

1 Answers

0
votes

As far as I understood, you didn't handle the detail band correctly.

When you add a detail band to a you jasper report, the band will be displayed at export for each input object

For example if you have 1 detail band and 10 records (images in your case) from report datasource, you'll get 10 detail band on the resulting exported document

My advise would be to only put one detail which takes less than a third of the page, and you should get the expected result.

more info on detail bands