문제

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.

도움이 되었습니까?

해결책

Add the following property to the text element:

<textField>
  <reportElement ...>
    <propertyExpression name="net.sf.jasperreports.style.forecolor">$F{color}</propertyExpression>
  </reportElement>
  ...
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top