mau72 Posted February 17, 2007 Share Posted February 17, 2007 I need having a variable one string where to hang various fields. This operation in Crystal Report came then made declaring a field of Stringvar type and hanging gradually the necessary fields. Practically I have need to carry out of the operations type $V{variable} = $V{variable} + $F{field} under various conditions. Unfortunately me it seems to have understood that this is not possible in iReport therefore is to ask like being able to make. Thanks Link to comment Share on other sites More sharing options...
walmillard Posted February 26, 2007 Share Posted February 26, 2007 Yes. you need to create a counter variable, and create a group for your $F{Field}. Set the counter to SUM the $F{Field} group on change. luckW Link to comment Share on other sites More sharing options...
jmurray Posted February 27, 2007 Share Posted February 27, 2007 Walmillard, mau72 is after string concatenation. Mau72 you concatenate strings exactly as you have described ( $V{variable} = $V{variable} + $F{field} ), however you can't 'cycle through' the fields. What you would need to do is more like this: $V{variable} = $F{field1} + $F{field2} + $F{field3} etc. If field2 was (say) an Integer you would have to perform an inline cast to String like this: $V{variable} = $F{field1} + $F{field2}.toString() + $F{field3} etc. 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