Parsing out values an counting
I have a field that returns a string value. I want to parse out how many times a question mark occurs in this string. So, if the string has two question marks I want to value of 2 to show, etc. I don't think there is an easy way of doing this within an expression. Has anyone done something like this within an expression?
July 25th, 2011 10:54am

Hi vba, According your description, you would like to create an expression which was used to calculate the count of the question mark occurring in the special string. You can use Replace function to replace “?” containing in the string to “”,then comparing the string length with its origin length. Please refer to the Expression below to have a try: =LEN(Fields!field.Value)-LEN(Replace(Fields!field.Value,"?","")),please note that you can replace Fields!field.Value to your own field string value. If you anything unclear, please feel free to let me know. thanks, Bill Lu
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2011 11:48pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics