Search code examples
sql-serversql-server-2008reporting-servicesssrs-tablix

SSRS filteration on the basis of length of content in the cell


How can I filter a report on the basis of the number of characters in a cell. E.g I have a column name and I want to show only those names in the report where the length of the name is less than or equal to 6. I tried expression= Name, operator=<=, and Value=lenth(name) but it is not working. Please help.


Solution

  • You should use the Length (LEN) function to get the character length of a field. The expression would be something like:

    =LEN(Fields!YourField.Value) 
    

    Operator: <=

    Value: 6

    If the length of the field is less than or equal to 6, the text in the field would be displayed, otherwise the data would not be displayed.