This is a migrated thread and some comments may be shown as answers.

How to make Report Parameter visible based on value of another report parameter selection

3 Answers 1288 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mary
Top achievements
Rank 1
Mary asked on 13 Jun 2016, 05:59 AM

Hi,

I have scenario where i have to make some report parameter visible based one Report parameter value like

in below screenshot attached if i select Audience in SelectCriteria ReportParameter  then report parameter listing all Audience value should display( and hide the Interviewee Report parameter), if Interviewee is selected in the  SelectCriteria ReportParameter then report parameter listing all interviewee should show (Audience report parameter should hide)

Please help me on this as it urgent.

Thank in advance

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 14 Jun 2016, 03:20 PM
Hi Mary,

Report parameters cannot be hidden based on other report parameter.
Instead I can suggest you:
  1. On report level - create cascading parameters, where values of the first parameter will control the values of the second parameter. For more details check How to: Cascading Parameters with applied filtering on data source level;
  2. On data-retrieval level - interpret selected values based on your requirements e.g. if you have a specific value for a given report parameter discard other received values. For example:
    public DataTable GetData(int controlParam, int secondParam, int thirdParam)
     {
       if(controlParam==0)
             return MyDataAccessLayer.GetData(controlParam);
        else
             return MyDataAccessLayer.GetData(controlParam, secondParam,thirdParam);
    }
  3. On UI level - you can create custom UI to let the user select values. This will let you show/hide parameter editors per your requirements. The custom UI should update the viewer's ReportSource.Parameters collection on submit. To hide the default viewer's parameters area, you can set all parameters Visible properties to false.

If you need further help, please use the support ticketing system, which guarantees you a response by Telerik representative.

Regards,
Stef
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
0
Mary
Top achievements
Rank 1
answered on 15 Jun 2016, 02:12 AM

Hi,

Can you please give sample example on code snippet given and for Custom UI to show /hide.

thanks in advance,

 

regards,

Mary Jain

0
Stef
Telerik team
answered on 15 Jun 2016, 01:14 PM
Hi Mary,

If you are using the HTML5 Viewer or its MVC wrapper, please check the following tutorial:

Regards,
Stef
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
Tags
General Discussions
Asked by
Mary
Top achievements
Rank 1
Answers by
Stef
Telerik team
Mary
Top achievements
Rank 1
Share this question
or