Hide Textbox in Report based on Report Parameter

2 posts, 0 answers
  1. Windhoek2010
    Windhoek2010 avatar
    16 posts
    Member since:
    Jul 2014

    Posted 08 Jan Link to this post

    I have an HtmlTextBox named htmlTextBox5 within my report, which I want to HIDE dynamically based on one of the parameters passed into the report when it is generated, Parameter2.


    if (Parameter2.value == "2")
         htmlTextBox5.Visible = false;


    Question is how do I get Parameter2 from within the report constructor? Or should I be setting the Visible property of htmlTextBox5 somewhere else?



  2. Katia
    Katia avatar
    714 posts

    Posted 13 Jan Link to this post


    The most straightforward approach would be to bind the Visible property of the HtmlTextBox item to the value of the report parameter using the report designer. Here is an example of expression that can be set in expression part of the binding:

    = Parameters.Parameter2.Value = "2"

    More detailed information can be found in the following help articles:


    Expressions Reference

    Using Report Parameters in Expressions


    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top