none
Dynamic column visibility in SSRS 2008 R2 Matrix

    Question

  • Hi!

    Is there any solution on how to set column visibility för an Matrix report in SSRS 2008 R2? I have read a lot on this issue but so far without no success in solving the issue. I,ve set Row Visibility with the code beow for the report. but i would like to use the same Iif statement for column DimCategory2 - DimCategory4 in the Matrix. Anybody that has a solution to this?

    Br Arne Olsson

    =IIF(Parameters!DimCategory2.Value =

    "Ej Vald",True,False)


    Arne Olsson

    Monday, November 18, 2013 12:05 PM

Answers

  • Hi Arne,

    Thank you for your post.

    Based on my research, if we hide the matrix based on an expression, there will no white space when the matrix is hidden. While once we hide or show the matrix directly, the space for the matrix is reserved on the page. Items on subsequent space will start below the reserved space.

    So if you control the visibility of the two tablix based on the value of the parameter, the report will automatically lift up the active matrix in the top.

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

    Thanks, 
    Katherine Xiong

       

    Katherine Xiong
    TechNet Community Support

    • Marked as answer by Arne Olsson Wednesday, November 20, 2013 2:04 PM
    Wednesday, November 20, 2013 1:49 PM

All replies

  • Hi Arne,
     
    In Reporting Services, if a column contains a cell that holds a row group, the Column Visibility property will be disabled. Regarding the screenshot you post, it seems that the DimCategory2 and DimCategory3 columns are all in the row group. In order to set the column visibility based on the parameter, ensure the column doesn’t contain the textbox that a row group is added to. In this way, the last column in the matrix can display the aggregation value for each value in the DimCategory1 column. So in your scenario, we cannot directly achieve your requirement. This is by design.
     
    As a workaround, I suggest that you can copy the current matrix in the report body, and delete theDimCategory2 - DimCategory4 columns with Delete columns only option in the second matrix. Then control the visibility of the two tablix based on the value of the parameter.
     
    Hope this helps.
     
    Regards, 
    Katherine Xiong

    Katherine Xiong
    TechNet Community Support

    Tuesday, November 19, 2013 2:31 PM
  • Hi Katherine!

    I,ve tested your workaround and it works good.  But as i have to place the different matrix below each other i wonder it it is possible to lift up the active matrix in top of the matrix.

    Br Arne 


    Arne Olsson

    Tuesday, November 19, 2013 9:32 PM
  • Hi Arne,

    Thank you for your post.

    Based on my research, if we hide the matrix based on an expression, there will no white space when the matrix is hidden. While once we hide or show the matrix directly, the space for the matrix is reserved on the page. Items on subsequent space will start below the reserved space.

    So if you control the visibility of the two tablix based on the value of the parameter, the report will automatically lift up the active matrix in the top.

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

    Thanks, 
    Katherine Xiong

       

    Katherine Xiong
    TechNet Community Support

    • Marked as answer by Arne Olsson Wednesday, November 20, 2013 2:04 PM
    Wednesday, November 20, 2013 1:49 PM
  • Hi Katherine!

    Thanks a lot for all your help i will set the visibility of the tablixes based on the value of the parameter and then i think it should work perfect.

    Thanks

    Arne   


    Arne Olsson

    Wednesday, November 20, 2013 2:04 PM