evalentine Posted April 5, 2010 Share 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. Link to comment Share on other sites More sharing options...
slow Posted April 6, 2010 Share 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! : ) Link to comment Share on other sites More sharing options...
evalentine Posted April 6, 2010 Author Share 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. Link to comment Share on other sites More sharing options...
slow Posted April 7, 2010 Share 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! : ) Link to comment Share on other sites More sharing options...
evalentine Posted April 8, 2010 Author Share Posted April 8, 2010 It is working now! Thanks. Link to comment Share on other sites More sharing options...
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