substring in ssrs

  • How to use substing in SSRS......i have something like (scottharshley)....i want only first 5 letters

    scott

    THanks in advance

  • you have a few options...

    1st you could limit the data length in your query so that you only return the first 5 letters to the Report server to begin with... this is what I'd recommend only because the less data going across the wire, the faster you report will execute.

    2nd, you could have a look at the LEFT() function as I believe that will get you what you need directly from the reporting services IDE.

    Cheer,

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Use MID() also

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • You can use functions like MID(), LEFT(), RIGHT(), LEN(), INSTR() to get a part of string.

    For your query to get first 5 letters, its simple like...

    =Left("scottharshley", 5)

    Let us know if anything clarifications needed..

    Thanks.

  • U can use in this Format as well:

    =LEFT(FORMAT(Fields!Test.Value, Server1),5)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply