Trying to get this expression working:
IIF(Fields!Text.Value like "*som:*",Split(Fields!Text.Value, ": ").GetValue(0)&":" & vbcrlf & Split(Fields!Text.Value, ": ").GetValue(1), Fields!Text.Value)
And for the fields which contain "som:" it works as I want but not for the "else fields" which show #Error. I've also tried Fields!Text.Value.ToString().Contain("som:") but got the same result.
The Warning goes: The Value expression for the textrun ‘XXXXXX.Paragraphs[0].TextRuns[0]’ contains an error: Index out of matrix/range (trying translate it so sorry if the error message is not exact)
The expression is made on a textbox and I need to have this function cause our costumer requires it.
I want this input kinda:
TExt text text som:
text text text
and else
TExt text text text text text
What am I doing wrong?