SSRS hiding null or blank values or better alernative?

  • Hi all,

    I am still a little new to SSRS, but I have a dataset with Reason1, Reason2, and Reason3. There also comments1, comments2 and comments3 that is associated with the reason. Most of the time reason 1 and comment 1 will always be filled out, but there could be a chance that they fill out the reason2 and reason3. I figured that you can type in another field in a cell, but when it's blank or null it adds rows. eg.

    [REASON1]

    [REASON2]

    [REASON3]

    What would be the best way to present this in a report? I still have not added the comments tied to the reason so that is a factor as well. Thoughts?

  • one way...

    SELECT [Reason1] AS Reason, [Comments1] AS Comments

    FROM [mytable]

    UNION ALL

    SELECT [Reason2], [Comments2]

    FROM [mytable]

    WHERE [Reason2] IS NOT NULL

    UNION ALL

    SELECT [Reason3], [Comments3]

    FROM [mytable]

    WHERE [Reason3] IS NOT NULL

    then you won't have repeating values. Somewhere on here, Kenneth Fisher wrote a Spackle article on doing normalization in a query, using CROSS APPLY, I think.

  • Thank you!

Viewing 3 posts - 1 through 2 (of 2 total)

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