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

Toggle 2 boolean report parameters

3 Answers 67 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
koos
Top achievements
Rank 1
koos asked on 24 May 2020, 05:10 AM
I have 2 bool report parameters. If the user changes the one to true, i want the other one to automatically change to false and vice versa. Say the first boolean is report parameter 1 on the list and the other one is report parameter 2. By using the expressions, I have managed to change parameter 2 to the correct value when changing parameter 1's value, but I can't get it to work the other way around. Expression on par 1: =(Parameters.parameter2.Value=False) Expression on par 2: =(Parameters.parameter1.Value=False) If I remove the expression on parameter 2, it works up.

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 27 May 2020, 04:10 PM

Hi koos,

Indeed, the Report Parameters can be used in a cascading scenario. However, this can be done only in one direction, for example, Parameter2 can depend on Parameter1, and in this case, Parameter1 cannot depend on Parameter2. The dependant parameter should be lower in the list of the parameters in the report.

Note that otherwise there will be a circular dependency, and when you change the value of Parameter1 this will trigger a change in Parameter2, which will trigger a change in Parameter1 and so on.

Can you share with us what is the scenario that requires this behavior?

Regards,
Todor
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
koos
Top achievements
Rank 1
answered on 27 May 2020, 04:56 PM
Thanks for the response Todor. I have noticed that it can only go one way. We have reports that we have to move over to Telerik. On the old one, they had a report parameter "Print company telephone number", another one "Print manager number" and another "Print customer number". These are just examples. I don't have the exact details with me at the moment. If the "Print company telephone number" is checked, the other 2 must be unchecked. If one of the other 2 are checked, the "Print Print company telephone number" must be unchecked. If it is only 1 of the 3, then I could have used a dropdown, but now "Print manager number" and "Print customer number" can both be checked (while the first one must then be unchecked).
0
Todor
Telerik team
answered on 01 Jun 2020, 09:40 AM

Hello koos,

As a workaround, you may use Custom Parameter Editors outside the report viewer, and when the client has finished editing the parameters, you may pass the selected values to the report viewer - see, for example, How To: Pass Values to Report Parameters in Html5 Viewer. You may implement the custom parameter editors functionality according to the requirements. The reporting tool will render the report with the final values you pass to the viewer.

Regards,
Todor
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Report Designer (standalone)
Asked by
koos
Top achievements
Rank 1
Answers by
Todor
Telerik team
koos
Top achievements
Rank 1
Share this question
or