I've been looking for a while now for an answer to what I think is probably quite an easy one, and thought I'd found it on stackoverflow here:
SSRS Reporting Services - Bold Word in String
But sadly it's not working. I'm trying to split a string where a certain word appears (in this case "Office") rather than a Parameter, and take everything to the left of that word.
E.g. where the string states 'London Main Office South 123' or 'Birmingham Main Office North 123', I just want 'London Main' or 'Birmingham Main', and if 'Office' does not appear then blank.
Here's what I've tried, but I'm getting #Error on the output:
=IIF(Instr(Fields!myString.Value, "Office"), Left( Fields!myString.Value , Instr( Fields!myString.Value , "Office") - 1 ),"")