Jump to content
We've recently updated our Privacy Statement, available here ×

Remove unwanted characters from string


reportah

Recommended Posts

I have a 'java.lang.string'

'BREAD/RYE   | |'

I need to remove the pipe symbols from the string but keep 'BREAD/RYE'

i tried:

new Boolean($F{r_item_desc}.replace('|',' '))

but that just renders $F{r_item_desc} invisable on my report

could somebody help me with a 'Print when expression' technique that will do this.

TIA

 



Post Edited by reportah at 05/29/2009 04:08
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Answering my own Question Again

It has to be in Text Field Expression in the form

$F{r_item_desc}.replace( "|", " " )

not in 'Print when expression'

in the form

new Boolean($F{r_item_desc}.replace('|',' '))



Post Edited by reportah at 05/29/2009 05:02
Link to comment
Share on other sites

  • 11 years later...

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