evalentine Posted April 5, 2010 Posted April 5, 2010 I am trying to set the value of a variable based on the value of the database field. The field is an integer and the variable is string.I have tried :$F{rts_status}.equals( 5) ? ($V{status}.equals( 'Closed' ):$V{status}.equals( 'Open' ))but I am getting the error 'Invalid character constant'. Any suggestions? Thanks.
slow Posted April 6, 2010 Posted April 6, 2010 :)i think you have little problems with java language :)try this...in the variable expression set:$F{rts_status}.equals( 5) ?"Closed":"Open" ______________________________if it works... KARMA point please! : )
evalentine Posted April 6, 2010 Author Posted April 6, 2010 I drink coffee but do not do Java! $F{rts_status}.equals( 5) ?"Closed":"Open"rts_status is integer, how do I convert it to a string for .equals? Thanks for your help.
slow Posted April 7, 2010 Posted April 7, 2010 if $F{rts_status} is an Integer then use: $F{rts_status}.intValue()==5 ?"Closed":"Open" Have you ever tasted the Italian coffe? :)______________________________if it works... KARMA point please! : )
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now