Placing an image field directly in Jasper report will not render the image in the report. However,the image can be shown in the report using these steps :
Step 1 : Create a field of type “Object” in iReport for the image.
<field name=”image_field”/>
Step 2 : Import JRImageLoader which will be used to show the image.
Step 3: Put an image placeholder by dragging from the palette list.
We need to type cast the field. Set the image expression like below.
JRImageLoader.loadImage((byte[])$F{image_field})
Step 4 : Set the image expression type to “java.awt.Image”.
The XML for the image expression will be like below.
<imageExpression class=”java.awt.Image”><![CDATA[JRImageLoader.loadImage((byte[])$F{image_field})]]></imageExpression>
Report groups or list components can be used to show images for each record in the foundset.