Check box display

$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://

theinsoesan's picture
Joined: Sep 14 2021 - 8:53pm
Last seen: 3 months 4 weeks ago

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.

theinsoesan - 4 months 1 day ago

1 Answer:

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>

yama818's picture
1829
Joined: Aug 17 2018 - 3:48pm
Last seen: 2 weeks 12 hours ago
Feedback