How to implement conditional formatting/conditional style in JasperSoft Studio 8.2?
Quote from lekrof on 8. July 2026, 15:31Hi out there,
today's problem is: In an d Excel output, I want to format entire rows depending on the value of the field in one column. The field contains only values like 0, 1, 2,3, 4,6, 7 etc. Field type is either BigDecimal. It might be also converted to a string in SQL. Following ireport_ultimate_guide, I have created a conditional style as a "subs-style" of the style used for rows. However, the conditional expression$F{DEBUG_EBENE_STRING}.toString().equals("0")
returns the following error in the report to which the style is applied:
"net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: Interpreted expression $F{DEBUG_EBENE_STRING}.toString().equals("0") is not a simple parameter/field/variable/resource message reference."I have also tried other expressions such as
$F{DEBUG_EBENE}.compareTo(new java.math.BigDecimal(0)) == 0
and$F{DEBUG_EBENE}.intValue() == 0
=> same error.
What can I do? Any hints are much appreciated.
Hi out there,
today's problem is: In an d Excel output, I want to format entire rows depending on the value of the field in one column. The field contains only values like 0, 1, 2,3, 4,6, 7 etc. Field type is either BigDecimal. It might be also converted to a string in SQL. Following ireport_ultimate_guide, I have created a conditional style as a "subs-style" of the style used for rows. However, the conditional expression
$F{DEBUG_EBENE_STRING}.toString().equals("0")
returns the following error in the report to which the style is applied:
"net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: Interpreted expression $F{DEBUG_EBENE_STRING}.toString().equals("0") is not a simple parameter/field/variable/resource message reference."
I have also tried other expressions such as
$F{DEBUG_EBENE}.compareTo(new java.math.BigDecimal(0)) == 0
and
$F{DEBUG_EBENE}.intValue() == 0
=> same error.
What can I do? Any hints are much appreciated.
