Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[expressions] replace the second character in str 2 in the result?

Status
Not open for further replies.

rogerzebra

Technical User
May 19, 2004
216
SE
Hi,
I can't figure this one out. I have the following expression.
Code:
=fields!Name.Value
The sample return this value.
Amy Anderson - >#500

The first part including the dash is a string, the string is concatenated with a column value which returns the >#500 part.
My question is how do I get rid of the # sign and replace it with a '' value using expressions? I'll not go into detail why the # sign is there in the first place, all I can say is that =fields!name.value is a parameter value for 6 different categories and I need to use the # sort the order in my query.

The code beneath is not working but I just hinting for you to easier understand the issue.

Code:
=(fields!Name.Value,str(replace("#",""))
Please any advice would be great this thing is killing me. Thx in advance.
 
Thanks for your respond paulkeys. It does what eliminate the # sign but, the problem all a long I have had is the sort order in the end result. Look beneath I want Amy Anderson - >100.000 to show in the end and not as the first result. This is really tricky.

Here is the result using your solution it does indeed work.

Amy Anderson - >100.000
Amy Anderson - <10.000
Amy Anderson - 25.000 to 50.000
Amy Anderson - 50.001 to 100.000

How do solve this thing, I have tried many solutions but I can't get it to work. Thanks again for your respond Paul.
 
Hey I got this solved, I just added a number higher than any other values in front of the # sign of each target. Thanks Paul it's really appreciated.

Mark this as solved**
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top