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

True, False RadioGroup Parameter

3 Answers 290 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 28 Oct 2011, 07:13 AM
Hi,

Been working with your Reporting solution and it's really good - thanks!
Most things have been very easy - however I'm a bit stumped on what appears to be a very simple request.

I have a NOT NULL boolean field that I want to filter on - I want the user to be able to show true values, false values or both. It would probably best be shown as a radiogroup - [True, False, All]

  I'm using an Entity Data Source so I presume I'd need to create an ObjectDataSource to show these three options. Can you show me the way you guys would do this and the best way to implement the UI for such a requirement. 

Thanks
Simon

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 28 Oct 2011, 05:14 PM
Hello Simon,

We are glad to hear from you that you like our Telerik Reporting tool.

Your task has indeed a simple solution. First you have to add a Report Parameter to your Report. More information on how to do that you can find here in this Report Parameters help article. In your specific case you will want to set the MultiValue and Visible properties to True. After you have added the Report Parameter you just have to add Filter to your data - the Filter will look something like this:

Expression: =Fields.MyBoolean
Operator: In
Value: =Parameters.MyBoolean.Value

All the best,
IvanY
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

0
Simon
Top achievements
Rank 1
answered on 28 Oct 2011, 09:43 PM
Thanks IvanY,

I had already done that - but all I get is an empty combobox. How do I populate it will True False values? If I add AllowNull=True, then it seems to only check for values that are null of which there are none. Every value is either True or False.  I want to be able to show True values, False values and ALL values.

Thanks
0
IvanY
Telerik team
answered on 31 Oct 2011, 02:17 PM
Hi Simon,

In the Report Parameters window you have to expand AvailableValues, select a DataSource and set the ValueMember to the same field which you use for filtering. I have attached a sample which is similar to your task - I added filtering for the last column, SalariedFlag. You may want to look at the Report Parameter and at the table filters. I hope this helps. 

Regards,
IvanY
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
Simon
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Simon
Top achievements
Rank 1
Share this question
or