Example 8. Filtering by related data column

Top  Previous  Next

In this example, we will use a column from a related data source to perform data filtering.

 

We will look at a "Simple list" report type, which prints products list. Category name is printed beside each product. This is done with the help of the relation:

 

[Products.Categories.CategoryName]

 

The report will be as follows:

 

dialogExample8_1

 

When we run the report, we will see the following:

 

dialogExample8_2

 

Let us add filtering by category name. For this, add a new dialogue and drag the "Products.Categories.CategoryName" column onto it:

 

dialogExample8_3

 

When creating control, you will be required to select its type. Choose CheckedListBoxControl. If we run the report, we will see the following dialogue:

 

dialogExample8_4

 

Choose several categories and click the "ОК" button. After this, the data will be filtered and you will see the following report:

 

dialogExample8_5

 

As seen, only products have remained, which are in the chosen category.