Jump to content

String variable please help


mau72

Recommended Posts

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

  • 2 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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