Jump to content
We've recently updated our Privacy Statement, available here ×

Color on the background of the cell while report execution


pankaj2.kumar

Recommended Posts

Hello all,

I have a Jasper report developed on iReport 4.0.1.

Their are certain columns in the report. When I execute the reprot, I need that the background colour of the static field get changed on the basis of value displayed in the cell.

For eg: If the value is between 2 and 5 then green, if the values is between 6 and 10 then Yellow.....etc  something like that

Please let me know how i can achive this task in iReport.

 

Thanks in advance.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

In the print when expression section(expression editor) use the expression [$F{filedname}.intValue()>=2&&$F{filedname}.intValue()<=5?Boolean.TRUE:Boolean.FALSE] and make the back ground colour to green and copy the same cell and use the other condition and give corresponding colour and put the cell over another.If u dont want to use the one cell over another,then go for " style" option with the same conditional formatting.

Thank you

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...