Jump to content
Changes to the Jaspersoft community edition download ×

How to set background color in row?


darya

Recommended Posts

Hi,

 

I'm using iReport 1.1.0 and look how to set the background color in a row.

 

Depending on one text field I want to switch the background color of all text fields in the row.

 

Does anyone how I can do it with iReport :blush: ?

 

Regards,

Darya

Post edited by: darya, at: 2006/09/04 08:56

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

 

I've used 2 textfields on the same location with the same expression, each having its corresponding backcolor.

 

Then, we have the variable in iReport called $V{REPORT_COUNT} that is incremented at every record/line.

 

So for the textfield with the backcolor that i want to display at the first line and then every 2nd alternation, i put in PrintWhenExpression:

new Boolean($V{REPORT_COUNT}.intValue()%2==0)

 

and for the textfield with the backcolor that i want to display at the 2nd line and then at every 2nd alternation, i put in PrintWhenExpression:

new Boolean($V{REPORT_COUNT}.intValue()%2==1)

 

Hope this helps for you.

 

Monica

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...