luigi.frasca Posted November 28, 2017 Share Posted November 28, 2017 HI,I have Jasper Reports that it should be print the values in different color according a condition.So this is my code:<style name="Style1"> <conditionalStyle> <conditionExpression><![CDATA[$F{OblPL}>0]]></conditionExpression> <style forecolor="#FF0000"/> </conditionalStyle> </style>and my field is so defined:<field name="OblPL" class="java.lang.Double"/>But it does not work, why ? Link to comment Share on other sites More sharing options...
reportdev Posted November 29, 2017 Share Posted November 29, 2017 try evaluating it a boolean<conditionExpression><![CDATA[($F{OblPL}>0)==true]]></conditionExpression> Link to comment Share on other sites More sharing options...
loyolafranklin67 Posted December 20, 2017 Share Posted December 20, 2017 Try this it is working for me.<style name="style.1pm_CET_UGL" mode="Transparent"> <conditionalStyle> <conditionExpression><![CDATA[$V{Trigger.1pm_CET_UGL}.doubleValue()>0]]></conditionExpression> <style forecolor="#FF0000"/> </conditionalStyle> </style> 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