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:
When we run the report, we will see the following:
Let us add filtering by category name. For this, add a new dialogue and drag the "Products.Categories.CategoryName" column onto it:
When creating control, you will be required to select its type. Choose CheckedListBoxControl. If we run the report, we will see the following dialogue:
Choose several categories and click the "ОК" button. After this, the data will be filtered and you will see the following report:
As seen, only products have remained, which are in the chosen category. |