locked
rdlc text box visibility formula RRS feed

  • Question

  • User1735684932 posted

    Hi, I have an rdlc file that has some text boxes. I have a flag value in my dataset. I want to check that flag if it is 1 then show the text box and if it is 0 then hide the text box. Any ideas??

    Fields!ConsentFlag.Value, "DSConsentRelease"
    
    This field I want to check if 0 or 1 then hide or show the text box respectively.

    Friday, April 8, 2011 8:22 AM

Answers

  • User-305876627 posted

    Right click on TextBox -> Text Box Properties --> Visibility -> radio button Show or hide based on an expression 

    You can show and hide items in a report using the visibility properties for the report item. In a data region such as a table, you can initially hide detail rows based on the value in an expression.

    • The following expression, when used for initial visibility of detail rows in a group, shows the detail rows for all sales exceeding 90 percent in the PctQuotafield:

      =Iif(Fields!PctQuota.Value>.9, False, True)
      
    • The following expression, when set in the Hidden property of a table, shows the table only if it has more than 12 rows:

      =IIF(CountRows()>12,true,false)
      
    • The following expression, when set in the Hidden property of a column, shows the column only if the field exists in the report dataset after the data is retrieved from the data source:

      =IIF(Fields!Column_1.IsMissing, true, false)

      see link for more info: http://msdn.microsoft.com/en-us/library/ms157328.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 12, 2011 1:10 PM