none
Show/Hide multiple Columns based on Parameter value in SSRS 2008

    Question

  • In SSRS 2008 I want to hide three columns based on passed parameters values,Parameters values are for the 3 parameters values.

    For Example : In table columns are Col1,Col2,Col3,Col4,Col5.

    And parametres fields are : PF1,PF2,PF3

    Initially  Col3,Col4,Col5  are hidden.

    When P1 is selected from PF1 and p2 is selected from PF2 then columns Col1,Col2,Col3,Col4 should be visible.

    When P11 is selected from PF1 and p22 is selected from PF2 then columns Col1,Col2,Col4,Col5 should be visible.

    How Can we achieve it .Please help me.

     

     


    Thanks Santosh
    Tuesday, December 21, 2010 9:45 AM

Answers

  • Yes you can achieve based on the "Visibility" tab (third radio button which say expression) under the columns (text box).

    something like this under text boxes for columns Col1, Col2, Col3 & Col4.

    = IIf(Parameter!PF1.Value = "P1" AND Parameter!PF2.Value = "p2", TRUE, FALSE)

     

    Please let us know your feedback.

    Thanks

    Kumar


    KG, MCTS
    Tuesday, December 21, 2010 1:21 PM
  • Hi Santosh,

    As your conditional are different you have define individually inside each of your required text boxes.

     

    Please let us know your feedback.

    Thanks

    Kumar


    KG, MCTS
    • Marked as answer by santoshsp Monday, December 27, 2010 1:04 PM
    Wednesday, December 22, 2010 2:42 PM

All replies

  • Yes you can achieve based on the "Visibility" tab (third radio button which say expression) under the columns (text box).

    something like this under text boxes for columns Col1, Col2, Col3 & Col4.

    = IIf(Parameter!PF1.Value = "P1" AND Parameter!PF2.Value = "p2", TRUE, FALSE)

     

    Please let us know your feedback.

    Thanks

    Kumar


    KG, MCTS
    Tuesday, December 21, 2010 1:21 PM
  • Yes,Of course I can do the things in that way, But In this way I have to define expression for all involved columns separately under text boxes.

    And is it possible that we can define the conditions at one place such as in custom code and manipulate it from one place ?


    Thanks Santosh
    Wednesday, December 22, 2010 7:06 AM
  • Sorry, but looks like you will have to do it in the textboxes itself as the condition is different for each column.
    Cheers,
    Jason
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

    Some Random Thoughts

    Wednesday, December 22, 2010 7:46 AM
    Moderator
  • Hi Santosh,

    As your conditional are different you have define individually inside each of your required text boxes.

     

    Please let us know your feedback.

    Thanks

    Kumar


    KG, MCTS
    • Marked as answer by santoshsp Monday, December 27, 2010 1:04 PM
    Wednesday, December 22, 2010 2:42 PM