Putting images on the specific page of the report


I want to put the dynamic number of the images on the Report and exporting that report in PDF Format.

Can any tell how to get specific page and putting images on it.Images have the same width but varying height i want that image should be completely on the page or it will be shifted to the next page

Any Help Regarding the problem will be greatly appreciated thanks
phoenix12051985's picture
Joined: Nov 5 2006 - 6:00pm
Last seen: 16 years 10 months ago

1 Answer:


The problem I'm seeing is that in JasperReports images do not stretch and adapt to their real size if the image element size is not enough.
They could only fit into the declared image element area or be clipped.
If you can live with this, then you could just put your images into some sort of custom JRDataSource so that the engine could iterate through them and display them in the detail section.
For details about how to do such a custom data source you could take a look at the supplied /demo/samples/datasource sample where you can find several custom data source implementations.
Also the /demo/samples/images sample could help you understand how images work in JR.

I hope this helps.
teodord's picture
Joined: Jun 30 2006 - 9:00am
Last seen: 50 min 54 sec ago