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

Filter at runtime

4 Answers 135 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Felice
Top achievements
Rank 1
Felice asked on 15 Oct 2013, 08:07 AM
Hi,
I know this question has been asked in the past but may be that with time and new added features there is something new on this subject.
I have a simple report with Customers by countries and I would like to give the user the possibility to choose a specific country to be rendered as report.

Is there a way to add a filter with preselected values on the report that can be used at runtime by the user?
Something like a drop down list.

Thanks,
Felice


4 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 16 Oct 2013, 08:22 AM
Hi Felice,

You can create report parameter that will list the possible countries the user can filter by. In order to provide a predefined list of entries for the report parameter you need to set its AvailableValues, ValueMember and DisplayMember properties. There is also an option to make a multivalued parameter as illustrated in the Using Multivalue Parameters help article.

Based on the created parameters you can filter the data:

Both suggestions are illustrated in the attached XML report definition, which requires a valid connection to AdventureWorks database and can be previewed with Telerik Reporting Standalone Designer (version 7.1.13.8020.

Let us know if you have any further questions.

Regards,
Stef
Telerik

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

0
Felice
Top achievements
Rank 1
answered on 31 Oct 2013, 05:31 PM
Hi Stef,
thanks for the support.
I checked the connection to AdventureWorks and it is fine but seems that there is a problem with the sample you sent me.
Please look at the attached pic. Looks like there is a variable missing somewhere.

Thanks,
Felice
0
Accepted
Stef
Telerik team
answered on 05 Nov 2013, 05:35 PM
Hello Felice,

The @groupname SQL parameter is used in the query retrieving data for the report's DataSource. It is mapped to a multivalued report parameter which is handled appropriately in the SQL query.

The other parameter performs the same data filtering task on report level, as it is included in a filter expression.

You can find attached a video illustrating at glance the settings of the SqlDataSource components in the report definition, the defined report parameters and their use to filter the data. The report in the video is opened with the Standalone Designer accompanying Telerik Reporting Q2 2013 SP1.

Let us know if you need any further help. Feel free to open a support ticket and send us your details and files for test there.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
Felice
Top achievements
Rank 1
answered on 06 Nov 2013, 07:26 PM
Thank you Stef,
problem solved. I also found a nice video on Telerik TV.

Thanks again,
Felice
Tags
General Discussions
Asked by
Felice
Top achievements
Rank 1
Answers by
Stef
Telerik team
Felice
Top achievements
Rank 1
Share this question
or