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

Report parameters: "All" value should not filter data

2 Answers 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Christophe
Top achievements
Rank 1
Christophe asked on 09 Sep 2013, 08:36 AM
I have a report parameter named "Trained" with the following values:
- All
- Trained
- Not trained

The problem is that I can not have a parameter value that does not filter ("All").

At the moment, the filter applied on my tab is as follows:
Expression: =Fields.ResourceTypeTraining (that is a boolean, true if trained)
Operator: =
Value: =(Parameters.Trained.Value Like "Trained" )

If the user selects "All" value, obviously only the "not trained" data will be displayed.

I have tried many solutions, with "Allow null" for example, but I still do not obtain what I want. Is there a property or something else that could fix that?

2 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 11 Sep 2013, 04:18 PM
Hello Christophe,

To solve this issue you can use the following expression in your report filter:

Expression:   =Fields.ResourceTypeTraining
Operator:   =
Value:   =IIf(Parameters.Trained.Value = "All", Fields.ResourceTypeTraining, Parameters.Trained.Value)

Let me know whether the proposed solution helps.

Regards,
Nasko
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Christophe
Top achievements
Rank 1
answered on 12 Sep 2013, 09:13 AM
It works perfectly, except that you cant compare bool and string, so it worked well with =IIf(Parameters.Trained.Value = \"All\", Fields.VolunteerTrained, IIf(Parameters.Trained.Value = \"Trained\",1,0))

Thank you !
Tags
General Discussions
Asked by
Christophe
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Christophe
Top achievements
Rank 1
Share this question
or