New to Telerik Reporting? Download free 30-day trial

Adding Filtering to Group

A filter defined on a report/table group limits the group members to certain values. These filters operate over the group members after the groups are calculated. Group filters are similar to the HAVING clause in a SQL statement.

We will use the filter to hide/show the dynamic groups members. Additionally we add the possibility for dynamic filtering by using report parameters. The example shown is based on the ProductSales demo report.

Using dynamic filter to show/hide crosstab group members

  1. Open the report in the designer and show the Group Explorer

    Group Explorer

    Show the Group Еxplorer in the Visual Studio Report Designer

  2. Define a new Report Parameter DetailsForYear as shown on the picture. Use the same DataSource as for the report. The parameter should be MultiValue.

    Define Report Parameter

    Define a multivalue Report Parameter in the demo report ProductSales.cs in the Visual Studio Report Designer

  3. Select the Crosstab (or any cell in it) and invoke the Edit Filters dialog for the Qtr Column group. Enter the filter expression as shown on next picture

    Set Filter

    Set Filter to the Column group Qtr of the Crosstab in the Visual Studio Report Designer

  4. Preview the report. Now it is possible to select for which year to show Quarter columns and hide for the rest.


    Preview of the final report with the filtered Crosstab column group in the Visual Studio Report Designer

See Also

In this article