lmbaptista Posted May 25, 2020 Share Posted May 25, 2020 Hi, allI’m trying to use conditional formatting in fields with numeric (double) values and I can define the forecolor, but the backcolor doesn't work.I’m using Jasper Studio 6.12 and most of the documented questions are related to iReports.I created a style (estilo_cond.jrtx) that I’m using in the report and then added some conditional styles and define the style in the element but the result do not respect the conditions. It looks like they aren’t there and no backcolor is changed.Are there any other thing I need to define in the cell for teh background color to appear?Here is the header of my report where I define the conditions. What is missing here?<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="teste_estilos_cond" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d8d7cc6f-e8bf-4e56-81b9-948cfd77b78a"> <property name="com.jaspersoft.studio.data.sql.tables"> <![CDATA[YEVTSUdCQVIyYC5gU01QX01FRElEQVNgIEFTICwxMzEsNjQsMjBjYjZkYzYtMjgxMC00MDhhLTljN2ItZTJlY2E5NWIyYzFlOw==]]> </property> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="TestDB"/> <template><![CDATA["estilo_cond.jrtx"]]></template> <style name="SimpleStyle" fontName="Arial"> <conditionalStyle> <conditionExpression><![CDATA[($F{00H_L1_P} <0.15)]]></conditionExpression> <style backcolor="#0000FF"/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[new Boolean($F{00H_L1_P} <1.15)]]></conditionExpression> <style backcolor="#79FC7B"/> </conditionalStyle> </style>Thanks in advance Link to comment Share on other sites More sharing options...
lmbaptista Posted May 27, 2020 Author Share Posted May 27, 2020 mode must be set to Opaque because teh default is transparent.As soon as the mode was set to opaque, teh colors appeared. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now