Using conditional formatting in iReport
问题 I have a report providing a table of data. The report works great so far. Now I need to colourise some cells according to their content value. I used to include the colour scheme in the Text Field Expression, for instance: ($F{MyBooleanValue}==true)?"<style backcolor='green'>PASS</style>":"<style backcolor='red'>FAIL</style>" That works but it is quite dirty and a hell to manage and re-use. So I turned to the Conditional formatting feature. I defined a based style called Colourised . Then two