Display image using ireport and oracle xe and apex

644 views Asked by At

I am using ireport 5.1 to build my report, now I am trying to display an image in my pdf report, but it is not showing up.

I copied the jpg file to the jasper directory where I have my ireport compiled file ( jrxml ), I am referencing the jpg file in my report as :

XML CODE :

        <image>
            <reportElement uuid="generated_uuid" x="2" y="4" width="119" height="50"/>
            <imageExpression><![CDATA["logovinhedo.jpg"]]></imageExpression>
        </image>

but it doesn't work

1

There are 1 answers

0
Praveen P Moolekandathil On

Please try the below code snippet:

  1. Store the full image path in a parameter IMAGE_PATH
  2. Apply the parameter instead of image file name.
<image>
    <reportElement x="2" y="4" width="119" height="50" />
    <imageExpression class="java.lang.String">!CDATA[$P{IMAGE_PATH}]]> </imageExpression>
</image>