Search code examples
ssrs-2008reporting-services

ssrs expression to split string possible?


so in my query i have select columnx from tblz

it returns 001.255556.84546

I want to be able to split this via '.' and put it into three columns.

column1 = 001
column2 = 255556
column3 = 84576

is this possible?


Solution

  • Create three calculated fields with the following expressions:

    =(Split(Fields!columnx.Value, ".")).GetValue(0)
    =(Split(Fields!columnx.Value, ".")).GetValue(1)
    =(Split(Fields!columnx.Value, ".")).GetValue(2)
    

    I'm not sure it works or not, maybe give it a try. You might need to use IIF() statement to check values before getting them.