Filtering out entries that start with 0

  • Hello All,

    I need to filter out entries that start with 0.

    The entries look like this:

    0;0;0;0;142.329;0;0;0;0

    23;0;0;0;0;0;0;0;0;0

    I need to keep any that don't start with 0.

    NOT LIKE isn't supported in SSRS 2012.

    Another complication is that I cannot filter the data out on the server end because it comes from an old PROGRESS database.

    Anyone have an idea on how to do this?

    Sincerely,

    James L. Eichelberger

  • So just to be clear, the numbers you are showing are individual rows from your dataset, not 2 rows as shown with ; between the columns.

    Fitz

  • They are individual varchar cells.

  • Ok I have just recreated the requirement as this.

    CREATE TABLE dbo.entries(entry varchar(20))

    INSERT INTO dbo.entries values ('0')

    INSERT INTO dbo.entries values ('0888')

    INSERT INTO dbo.entries values ('324')

    INSERT INTO dbo.entries values ('0')

    INSERT INTO dbo.entries values ('90')

    INSERT INTO dbo.entries values ('0')

    From the an SSRS report is produced that has the query

    SELECT * FROM dbo.entries

    This would allow for a table to be created with a single column holding the values.

    As the filter on the tablix does not allow for a NOT LIKE directly then use an expression.

    1. In the filters tab add a new entry. Click Fx next to expression and enter the formula ="1"

    2. In the value also click Fx and add the formula as below.

    =iif(Left(Fields!entry.Value,1) = "0", "0", "1")

    This will return a 0 if the entry starts with 0 and a 1 otherwise.

    When checked again the original expression only entries with a 1 will be allowed to pass the filter.

    Fitz

  • Mark,

    Thank you very much!

    That approach worked perfectly.

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

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