MS Reporting Services Conditional Formatting

Posted on 2005-04-27
Last Modified: 2008-03-03


Question on using conditional formatting in an expression using MS Reporting Services. This is a time sensitive issue for me.

1. iif - how do you do like an if...elseif...else type statement with these?
2. switch - how do you specify a default for a switch?

thanks in advance, I \'m having trouble finding decent resources out there for anything beyond the most basic tutorials

Question by:animated405
    LVL 7

    Accepted Solution

    =IIF(Thing To Test, What to do if True, What to do if False)

    Set Visibility.Hidden = True if Parameters!Test.Value = 0

    =IIF(Parameters.Test.Value = 0, True, False)

    You can use code to handle more detailed If..then logic.  You actually create the Code in the Code tab of the Report Properties.  See this site about embedding code in the report:

    I'm not sure what you mean by switches.

    Author Comment


    thanks, i thought I could do this right in the expression for that fields in the table, but the code portion works just as well.

    also, I was talking about a switch statement instead of using and if...else type statement which I could have put right in the expression if I knew how to set the default case

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    1. Set up your parameter at the report level as usual, check the box Multi-value, and set the Data Type to String 2. Set the Stored Procedure Parameter to varchar(max)  --<---- This part here is the key to it's success Example:    @cst_key var…
    Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now