Reputation: 4146
I have in DB a textfield with HEX color property, for example:
**Name, Color**
John Doe, #FF0000
Albert Smith, #AF0FBA
How can i pass these HEX values through jrxml to render font color properly? Conditional styling didn't match, because i have over 16 millions of colors.
Upvotes: 1
Views: 1119
Reputation: 5113
Add the following property to the text element:
<textField>
<reportElement ...>
<propertyExpression name="net.sf.jasperreports.style.forecolor">$F{color}</propertyExpression>
</reportElement>
...
Upvotes: 3