Wrong rendering for textfield using styled markup

16 Views Asked by At

I'm using Jaspersoft Studio v. 6.17.0. I have a textfield that displays product order info and, on a second line, displays associated notes in bold. See for example enter image description here

The textfield expression to do this is $F{vendorPartNum} + ($F{isPoItemNote} ? "\n" + "<style isBold='true'>" + $F{poItemNote} + "</style>" : ""). The field values for the above screenshot are enter image description here

This has been working for a long time. Recently, for one case, it hasn't. For this input,

enter image description here

the rendering is

enter image description here

Here, the HTML tags for formatting are being rendered literally instead of being used for formatting. What's wrong?

=====

Here's the textfield definition.

<textField isStretchWithOverflow="true">
    <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="300" height="31"/>
    <box padding="5">
        <pen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
    </box>
    <textElement verticalAlignment="Middle" markup="styled"/>
    <textFieldExpression><![CDATA[$F{vendorPartNum} + ($F{isPoItemNote} ? "\n" + "<style isBold='true'>" + $F{poItemNote} + "</style>" : "")]]></textFieldExpression>
</textField>
0

There are 0 best solutions below