How to filter data in report using binding scripts

The following article describes how to filter data in report using binding scripts.

Let’s assume that we need to display some filtered data from the data source (the data which does not meet some certain criteria should not be displayed). To do that we can take advantage of binding scripts.

Let’s see how we can do that on an example. So, we have the Person table that includes name and age of a person and we need to display all people older than 24 years without using data source (using just Report Designer features)

Here is what we should do:

  1. Let’s place all data we need to hide according to the set condition into a separate detail:
  2. Let’s render a report without filtering:


    As you can see, the report contains both required data and the data we don’t need.
  3. Using bindings, let’s set condition for Visibility property of the detail’s container: 


  4. Save a report and render a report once again: 

    As we can see, changing the Visibility property of the container allows filtering data using Report Designer features without touching DataSource.


Add Feedback