Need to display "Image not Available Text" in the space designated for the logo if the image is not available

0

I have to display "Image not Available Text"  in the space designated for the company logo if the image from the server is not available at fill time during pdf generation.

Is there any way to conditionally load  a text message in the image expression if the image in concern is not available or the image file is not found. Please help.

chandan.kits's picture
Joined: Sep 2 2013 - 11:48am
Last seen: 4 years 10 months ago
Hi i am also facing the same issue. Dont know how to find if the image is available in certain path. If not availabe, need to print "image not available". Did you get any solution for this??
nsgraji - 4 years 8 months ago
<detail>
<band height="417">
<image onErrorType="Blank">
<reportElement x="84" y="10" width="380" height="380" uuid="876b42e6-3b20-4746-85b4-04ee04883e18"/>
<imageExpression><![CDATA[$V{emailidVarb}]]></imageExpression>
</image>
</band>
 
Use onErrorType=Blank inside Image tag. It will not show any image if image is not available instead of showing Byte not found.
nsgraji - 4 years 8 months ago

1 Answer:

0
<detail>
<band height="417">
<image onErrorType="Blank">
<reportElement x="84" y="10" width="380" height="380" uuid="876b42e6-3b20-4746-85b4-04ee04883e18"/>
<imageExpression><![CDATA[$V{emailidVarb}]]></imageExpression>
</image>
</band>
 
Use onErrorType=Blank inside Image tag. It will not show any image if image is not available instead of showing Byte not found.
nsgraji's picture
Joined: Mar 13 2015 - 12:41am
Last seen: 3 years 9 months ago
Feedback
randomness