$F{receiverIdType}.intValue()==1? "http://localhost:8080/assets/images/checkbox_full.png" : "http://localhost:8080/assets/images/checkbox_empty.png"
it doesn't work in report only display http://
1 Answer:
Posted on January 26, 2022 at 3:23pm
I think it is better to use the 'Image' component instead of the 'Text' component.
<image> <reportElement x="120" y="20" width="50" height="50" uuid="f05b77ee-c791-4436-9e43-3d59b6bd45a2"/> <imageExpression><![CDATA[$F{receiverIdType}.intValue()==1? "http://localhost:8080/assets/images/checkbox_full.png" : "http://localhost:8080/assets/images/checkbox_empty.png"]]></imageExpression> </image>
I used to try with this'
<textField>
<reportElement x="507" y="384" width="49" height="15" uuid="f5f3a1ab-e595-4413-b36c-7e18b318b754"/>
<box topPadding="0" bottomPadding="2"/>
<textElement verticalAlignment="Bottom">
<font fontName="DejaVuSans"/>
</textElement>
<textFieldExpression><![CDATA[$F{receiverIdType}.intValue()==2? "\u2611" : "\u2610"]]></textFieldExpression>
</textField>
JVM dosn't know "DejaVuSans" font.