none
How to hide column of a tablix within a Group? RRS feed

  • Question

  • I have a tablix that is drawn for every new group in my report. When I set a column's visibility=false based on a certain field value, it does not hide the column.

    GROUPING:

    Tablix 1: Col 1 -- Col 2 --

      

    Tablix 2: Col 1 --            <<<<I want to hide Col 2 here based on field value. Visibility expression does not work.

    Tablix 2 is just a new iteration of Tablix 1 with different values.


    --ACG
    Friday, July 8, 2011 9:13 PM

Answers

  • Hi ACG

    Thanks for your clarification.

    Are you using expression to hide the Col2 based on field value? Values of filed name are different, and it may cause different results to hide the Col2. We can hide the Col2 in one situation and display it in another situation, I suggest trying to use a static value to hide the Col2 in expression like following example:
    =Iif(ReportItems!TextboxName.Value = "1",TRUE,FALSE).

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

    Thanks,
    Eileen

    • Marked as answer by Eileen Zhao Saturday, July 30, 2011 2:53 PM
    Tuesday, July 26, 2011 6:30 AM

All replies

  • Hi ACG,

    The thought of hide column through customized expression in column Visibility properties is right, the root cause of column still appears is that you select a table column on the surface design and set the Visibility, but it doesn’t hide the actual table column. Please take the following steps as a reference:

    1. Click on the small triangle, which is locate in the lower right corner of the report design surface, and select “Advanced Mode” to show static members.
    2. Select the “static” which represent the column that you want to hide in the “Column Groups”.
    3. Click the Hidden drop-down list from Visibility property, select <Expression…>.
    4. Type in the expression:=Iif(Fields!SomeRow.Value = "",TRUE,FALSE).

    After you complete above steps, when you preview the report, you will find the column is hidden.

    For more information about this, please refer to the Robert’s profession blog:
    http://blogs.msdn.com/b/robertbruckner/archive/2010/05/02/report-design-shrinking-hidden-static-columns.aspx

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

    Thanks,
    Eileen

    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Saturday, July 9, 2011 2:08 AM
  • Hi ACG,

    You can hide the same from "Advanced Mode" at right bottom of the report, as value depends on group you need to provide hidden expression in Advanced tab.

     

     

    Amit

    Hope it works, please mark as answer if useful

    Saturday, July 9, 2011 1:35 PM
  • Thanks for your reply. This did not work for me. At first I thought it was because I had a merged row that spanned the length of the table, but then I split that row and applied your suggestion and it did not work. If I don't use an expression and just set the Static to Hidden=True then it works but it hides all the instances of that column and that's not what i want. There is nothing wrong with my Hide expression because I have used it to hide each cell of the column and that works fine. Any suggestions?
    --ACG
    Monday, July 11, 2011 3:02 PM
  • Hi ACG

    Thanks for your clarification.

    Are you using expression to hide the Col2 based on field value? Values of filed name are different, and it may cause different results to hide the Col2. We can hide the Col2 in one situation and display it in another situation, I suggest trying to use a static value to hide the Col2 in expression like following example:
    =Iif(ReportItems!TextboxName.Value = "1",TRUE,FALSE).

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

    Thanks,
    Eileen

    • Marked as answer by Eileen Zhao Saturday, July 30, 2011 2:53 PM
    Tuesday, July 26, 2011 6:30 AM