locked
Hiding column in same group based on month parameter RRS feed

  • Question

  • Hi,

    I need to a make MTR column visible of the same group, based on user selection(i.e. need to create prompt),also it should be dependent on the month parameter which is already created.So if the month is Between Sept to Apr,then MTR parameter(prompt) should be active else if the other months are selected MTR column should be grayed.

    Below is the representation of the matrix

    KPI Act Bud MTR
    YTD YTD YTD
    2012-13 2012-13 2012-13
    BU1 1 2 2
    BU2 2 3 3
    BU3 3 4 4

    Regards

    Archana

    Thursday, June 27, 2013 12:11 PM

Answers

  • Hi Archana,

    You can use the expression below to set the visibility of the column.
    =IIF((Parameters!Month.Value="Apr" OR Parameters!Month.Value="May" OR Parameters!Month.Value="Jun" OR Parameters!Month.Value="Jul" OR Parameters!Month.Value="Aug" OR Parameters!Month.Value="Sep") And Fields!Column.Value="MTR",false,true)

    If you have any questions, please feel free to ask.

    Regards,


    Charlie Liao
    TechNet Community Support

    • Marked as answer by Archana_M Friday, June 28, 2013 7:59 AM
    Friday, June 28, 2013 2:43 AM

All replies

  • You Can Refer this Link 

                                    http://www.go4answers.com/Example/ssrs-hide-column-parameter-202439.aspx

                              http://stackoverflow.com/questions/726783/reporting-services-hide-table-column-based-upon-report-parameter


    Rajan.r

    Thursday, June 27, 2013 12:15 PM
  • Hi Archana,

    it is achivable by several ways

    1. use IF ELSE based conditions and write SELECT with limited columns u need for specific condition

    2. Use dynamic SQL to achieve this requirement.

    3. User CASE statement here

    SELECT  CASE WHEN  @month between 4 and 9 THEN MTR END
    FROM your_Table

    You can add more WHEN conditions with different columns

    Please mark this converasation as answer whenver you get a chance

    Thursday, June 27, 2013 2:05 PM
  • Hi Archana,

    You can use the expression below to set the visibility of the column.
    =IIF((Parameters!Month.Value="Apr" OR Parameters!Month.Value="May" OR Parameters!Month.Value="Jun" OR Parameters!Month.Value="Jul" OR Parameters!Month.Value="Aug" OR Parameters!Month.Value="Sep") And Fields!Column.Value="MTR",false,true)

    If you have any questions, please feel free to ask.

    Regards,


    Charlie Liao
    TechNet Community Support

    • Marked as answer by Archana_M Friday, June 28, 2013 7:59 AM
    Friday, June 28, 2013 2:43 AM
  • Thanks Charlie,the solution worked for me.
    Friday, June 28, 2013 7:59 AM