law Posted August 13, 2012 Share Posted August 13, 2012 Hi all, I'm attempting to do this simple concatination routine in the iReport that results in errors on build. In "Variable Experssion" I have this: $V{likesStr}+=$F{likes}+","Basically, I want to build a coma separated string of field $F{likes}, then later create an array out of it. I tried criating an array on the fly, directly, but couldn't get it populated correctly, the array was retaining only the very last value out of a set of values. I'm hoping to get my array out of the string I'm attaempting to build. The compiler error is: '(java.lang.String) variable_likesStr.getValue()', is a bad expression as the left hand side of an assignment operatorAny deailed suggestions will be much appreciated. Link to comment Share on other sites More sharing options...
law Posted August 13, 2012 Author Share Posted August 13, 2012 Here is what I discovered works for concatenating a field to a string: $V{my_var_str}+$F{my_field}+',' Strange syntax, but does work. Link to comment Share on other sites More sharing options...
law Posted August 13, 2012 Author Share Posted August 13, 2012 Syntax for splitting the string into a String array: $V{my_var_str}.split(",") 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