Pregunta

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.

¿Fue útil?

Solución

Add the following property to the text element:

<textField>
  <reportElement ...>
    <propertyExpression name="net.sf.jasperreports.style.forecolor">$F{color}</propertyExpression>
  </reportElement>
  ...
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top