Monday, February 20, 2012

Problems using Split function

Hi,
I'm trying to use the common text function "Split" to split the report name.
An example report name would be "REF001-Title of Report". I'd like to be
able to split this report name global into "REF001" and "Title of Report"
However I can't get my head around the way Reporting Services wants me to
write the expression.
I've started with the below, and know it somehow needs to be split into an
array of which I can use elements 0 and 1, but I don't know what syntax it
wants me to use.
=split(Globals!ReportName,"-")
Can someone please help.!?
JHYou just need to grab what element you want.
Example:
=Split("abacad", "a")(1)
returns "b"
Steve MunLeeuw
"JH" <JH@.discussions.microsoft.com> wrote in message
news:EE22A431-73B9-4CCD-921E-70503930E6C9@.microsoft.com...
> Hi,
> I'm trying to use the common text function "Split" to split the report
> name.
> An example report name would be "REF001-Title of Report". I'd like to be
> able to split this report name global into "REF001" and "Title of Report"
> However I can't get my head around the way Reporting Services wants me to
> write the expression.
> I've started with the below, and know it somehow needs to be split into an
> array of which I can use elements 0 and 1, but I don't know what syntax it
> wants me to use.
> =split(Globals!ReportName,"-")
> Can someone please help.!?
> JH

No comments:

Post a Comment