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

cannot convert from String to boolean


bvasu_1

Recommended Posts

Hi,

Can't see what is wrong here when Expression Editor says it is OK.

"CODE" + "n" + 
($F{c_Code_1}.equals("1"))?"No Help available":
(($F{c_Code_1}.equals("2"))?"Not eligible":
(($F{c_Code_1}.equals("3"))?"Refused help":
(($F{c_Code_1}.equals("4"))?"Client resolved":"Else")))

Errors were encountered when compiling report expressions class file:
1. Type mismatch: cannot convert from String to boolean
value = "CODE" + "n" +  //$JR_EXPR_ID=14$
(((java.lang.String)field_c_Code_1.getValue()).equals("1"))?"No Help available": //$JR_EXPR_ID=14$

Thanks!

Bill

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Try moving "CODE" + "n" +  to each string.

($F{c_Code_1}.equals("1"))?""CODE" + "n" + No Help available":
(($F{c_Code_1}.equals("2"))?""CODE" + "n" + Not eligible":
(($F{c_Code_1}.equals("3"))?""CODE" + "n" + Refused help":
(($F{c_Code_1}.equals("4"))?""CODE" + "n" + Client resolved":""CODE" + "n" + Else")))

 

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