Jump to content
Changes to the Jaspersoft community edition download ×

2005 IR Help

Recommended Posts

By: Michael Hauck - swissmike

Image If

2004-07-13 02:36

I have 2 images. I get them as URL.





I also have a field $F{valid}


How can I tell the report to print the first image when the content of the field {valid} is 0 and the second image when it's any other number. I have tried adding a variable with the following expression:


"0".equals($F{valid}) ? $P{imageboolean_false} : $P{imageboolean_true}


This doesn't work. I always get the second image. What am I doing wrong?





By: Tobias Gaekle - ike987

RE: Image If

2004-07-13 04:20

i'd guess $F{valid} is not of type java.lang.String.

try "0".equals(String.valueOf($F{valid}))






By: Michael Hauck - swissmike

RE: Image If

2004-07-13 06:28

Yes, that did it! Thanks! :)

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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