Hide And Unhide Parameters

  • Hi All,

    I would like to ask if it is possible to hide/unhide parameters in Reporting services. my scenario are as follows

    i have a dropdown parameter named show parameter which has 2 values, Yes or No. i have 2 or more normal parameters that will be manipulated by the Show parameter. if i click yes the regular parameters will appear at runtime. if the user selects no the 2 regular parameters will be hidden. and may i ask if i can set a default value for that parameter if it is in hidden state?

    Thank you and god bless.

    N.O.E.L.

  • There are various ways you can approach this, but you should accept from the start that it's not possible to hide the parameter from view, this is not possible. What is possible is that the parameter can be automatically greyed out by reporting services when it doesn't need a value.

    Example:

    Let's say you have parameter A and Parameter B.

    Parameter A has a value of either Yes or No.

    Parameter B has a value of either 1,2 or 3 but only if parameter A has a value of Yes.

    1. Make sure parameter B allows NULL values.

    2. Create a Dataset for Parameter B, this data set should work from Parameter A for example:

    IF @ParameterA='Yes' BEGIN

    SELECT '1' AS Value

    UNION ALL

    SELECT '2' AS Value

    UNION ALL

    SELECT '3' AS Value

    END

    3. In the list of Parameters, make sure Parameter B is second (this is not compulsory, just makes logical sense for the end user).

    I think this should work, good luck.

    Nigel.

    Nigel West
    UK

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

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