locked
tablix row visibility error RRS feed

  • Question

  • User-939069355 posted

    hi,

    I'm have a table with the following columns

    Table A
    Parent      Child               DisplayText    Value
    IT             Programmer   Programmer   John
    IT             Programmer   Programmer   John
    IT             Analyst           Analyst           Alex
    HR                                                      Sarah
    HR                                                      Yeena 

    And in my report I have a tablix with 2 groups, 1 named child group, and 1 named parent group which looks like this

    [Parent Group]
    [Child Group]
    Value

    In the [Parent Group] row I display the text as per Parent column and in the [Child Group] row I display the text with expression of

    =IIF(Fields!DisplayText.Value = "", Fields!Child.Value, Fields!DisplayText.Value)

    Report works well except that because sometimes both the Child and DisplayText column may have empty values, therefore I would like to hide that row. I tried using expression for textbox properties visibility..

    =IIF(IIF(Fields!DisplayText.Value = "", Fields!Child.Value, Fields!DisplayText.Value) = "", TRUE, FALSE)

    During preview of the report in visual studio 2008, the report looks fine on page 1 but when I navigate to any other page it will throw this error.

    An error occured during local report processing. Object reference not set to an instance of an object.

    Please advice on how to hide the row.

    Thanks!

    Wednesday, April 3, 2013 10:39 PM

Answers

  • User-67082742 posted

    Hi,

    For hiding teh entire row I suggest to select the row in tablix and in row visibility and write the expression:

    =IIF( Len(Fields!DisplayText.Value)>0 and Len(Fields!Child.Value)>0, false,true)

    Please let me know if this does not help.

     

    Please mark as answer if this helps!

    AB

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 5, 2013 2:44 AM
  • User-939069355 posted

    Thanks! I used the Len function and it helped me solve my issue. However because in my report I check for if child is empty then I use display text, I cant really use your code. Therefore my code is

    =IIF(Len(TRIM(IIF(IsNothing(Fields!DisplayText.Value), Fields!Child.Value, Fields!DisplayText.Value))) = 0, true, false)

    Thank you though!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 5, 2013 6:23 AM

All replies

  • User-1716253493 posted

    try

    Not Fields!DisplayText is Nothing

    Mean check DisplayText not null first before checking DisplayText.Value

    Wednesday, April 3, 2013 10:56 PM
  • User-939069355 posted

    Currently in my stored procedure I checked for ISNULL and replaced all NULL values with an empty string. However the row is still visible.

    Thursday, April 4, 2013 12:35 AM
  • User-67082742 posted

    Hi,

    For hiding teh entire row I suggest to select the row in tablix and in row visibility and write the expression:

    =IIF( Len(Fields!DisplayText.Value)>0 and Len(Fields!Child.Value)>0, false,true)

    Please let me know if this does not help.

     

    Please mark as answer if this helps!

    AB

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 5, 2013 2:44 AM
  • User-939069355 posted

    Thanks! I used the Len function and it helped me solve my issue. However because in my report I check for if child is empty then I use display text, I cant really use your code. Therefore my code is

    =IIF(Len(TRIM(IIF(IsNothing(Fields!DisplayText.Value), Fields!Child.Value, Fields!DisplayText.Value))) = 0, true, false)

    Thank you though!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 5, 2013 6:23 AM