Image element in table element

0

Hi,

How can we display image based on condition in  table element in jasper studio?

 

Thanks,

Jeevana.

jeevanabattu's picture
Joined: Feb 25 2020 - 6:11pm
Last seen: 1 week 3 days ago

1 Answer:

0

I believe that display an image inside a table is normal as you display it in other place in the report.
Use the <printWhenExpression><![CDATA[Your_condition]]></printWhenExpression> to display your image base on one condition.

<image hAlign="Center" vAlign="Middle" onErrorType="Blank">
   <reportElement x="67" y="25" width="30" height="26" uuid="db7ceb3f-0887-4a24-8a93-51ab127d7ba9">
      <property name="com.jaspersoft.studio.unit.width" value="px"/>
      <property name="com.jaspersoft.studio.unit.height" value="px"/>
      <printWhenExpression><![CDATA[$F{detected}]]></printWhenExpression>
   </reportElement>
   <imageExpression><![CDATA["static/pdf-components/caution.png"]]></imageExpression>
</image>
I am Leo's picture
155
Joined: Jan 3 2020 - 3:13am
Last seen: 2 days 23 hours ago
Feedback
randomness