February 1, 2016 at 12:55 pm
In an ssrs 2008 report, I would like to select on only part of a value that displays on the report heading. I have tried to use the mid function so far, but I have not been able to select the correct part of the string I want to see.
An example of a value is 'Grace Elementary - 066 15-16 Grace Elem' and I want the value to look like
'066 15-16 Grace Elem' . Thus would you show me how to change the display value to be '066 15-16 Grace Elem'?
February 1, 2016 at 1:26 pm
Have you tried Right(Expression, 20)?
February 1, 2016 at 2:07 pm
You need INSTR
=Right(Variables!TheSchool.Value,Instr(Variables!TheSchool.Value," - ")+3)
February 2, 2016 at 12:13 pm
The school value could also look like ' King Potter (7-8) - 894 15-16 King Potter Tech'. The value I want from this string is '894 15-16 King Potter Tech'.
The best way to obtain the needed value is to start from the right side and look for '-' before the 894. Thus could you show me how to access that data?
How would you obtain the this value and the previous one that I listed above?
February 2, 2016 at 12:28 pm
This worked for me:
=RIGHT(Fields!School.Value,LEN(Fields!School.Value)-InStr(Fields!School.Value," - ")-2)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply