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

How to group combobox parameters?

4 Answers 243 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 17 May 2019, 02:24 PM

Hi,

I want to group some items in the combobox of my reports.

Please see the example( groupedCombobox.jpg ) , which I have attached.

I used horizontal lines to separate the groups.

But how can I realize that in a report parameter which is a combobox?

Have you an example project?

 

Regards

4 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 22 May 2019, 12:15 PM
Hello Simon,

I would suggest to use Cascading Parameter. In this way, you can select OriginCountry and based on that you can choose CarBrand.
The attached report  contains a CSV DataSource with OriginCountry , CarBrand and Price columns and the following approach is applied:
1)  Add a report parameter and set it as follows:
AvailableValues: DataSource: csvDataSource
     DisplayMember: =Fields.OriginCountry
     ValueMember: =Fields.OriginCountry
MultiValue: True
Name: Country
Type: String
Value: =AllValues(Fields.OriginCountry)
Visible: True

2) Add second report parameter and set it as in the screenshot.

3) In the table all columns are added and the following filter is applied:
Expression: =Fields.CarBrand
Operator: =
Value: = Parameters.CarParameter.Value

In this way only the selected car and its price will appear in the table.

Regards,
Neli
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
0
Simon
Top achievements
Rank 1
answered on 23 May 2019, 07:47 AM

 

Hello Neli,

thank you for your solution.

However, you must have one more report parameter to implement the grouping.

But nice solution, it works.

 

Best Regards

Simon

 

0
Simon
Top achievements
Rank 1
answered on 23 May 2019, 12:56 PM

Update:
the deeper I nest the more parameters I need.
I tried it over 3 levels - see attachement.
I thought it gives a more elegant way with one parameter.

But for this case it's okay.

0
Neli
Telerik team
answered on 27 May 2019, 11:36 AM
Hello Simon,

Indeed, you need a separate Report Parameter for each level of data hierarchy (e.g for Country, State, City, etc). This lets you filter the data on each level. If you need to achieve the functionality through one parameter it will be necessary to concatenate the values from the different fields, which may not be very convenient for the end user.

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