The articles in this section of the Knowledge Base involve working with Lists for display in your reports. To learn more about Lists and how to access the Report Designer, see Creating Lists in Report Designer. This article provides information for applying a Filter to a Data band.
Sometimes you may find it necessary to print rows of the Data source that correspond to a definite condition. A Filter is used to select the rows that meet this Condition. To set a Filter, open the Data band editor by double-clicking the Data band. It is also possible to call the Data band editor using the Filter property of the Data band (Figure 01).
A filter works by establishing a condition to be evaluated as either true or false. Each data row in the Data Source will be processed through the filter individually. If the data row evaluates as true, it will be rendered in the Report. If it evaluates as false, it will be ignored and not be printed.
There are two ways to set a Filter’s Condition:
The Table below features the different Operation types and their descriptions as applied to each data type.
Name of Operation
|
String
|
Numeric
|
Data
|
Logic
|
Expression
|
Description
|
Equal to
|
✔
|
✔
|
✔
|
✔
|
✔
|
When the first value is equal to the second value, the Condition is true.
|
Not Equal to
|
✔ |
✔
|
✔
|
✔
|
✔
|
When the first value is
NOT equal to the second value, the Condition is true.
|
Between
|
|
✔
|
✔
|
|
✔
|
When the first value is in the range, the Condition is true.
|
Not Between
|
|
✔
|
✔
|
|
✔
|
When the first value is
NOT in the range, the Condition is true.
|
Greater than
|
|
✔
|
✔
|
|
✔
|
When the first value evaluates as greater than the second value, the Condition is true.
|
Greater than or Equal to
|
|
✔
|
✔
|
|
✔
|
When the first value evaluates greater than or equal to the second value, the Condition is true. |
Less than
|
|
✔
|
✔
|
|
✔
|
When the first value is less than the second value, the Condition is true.
|
Less than or Equal to
|
|
✔
|
✔
|
|
✔
|
When the first value is less than or equal to the second value, the Condition is true.
|
Containing
|
✔
|
|
|
|
|
When the first value contains the second value, the Condition is true.
|
Not Containing
|
✔
|
|
|
|
|
When the first value does
NOT contain the second value, the Condition is true.
|
Beginning with
|
✔
|
|
|
|
|
When the first value begins with the second value, the Condition is true.
|
Ending with
|
✔
|
|
|
|
|
When the first value ends with the second value, the Condition is true.
|
The Expression type of Condition is set as a text expression that returns a Boolean value (true or false).
An example of an expression to compare a value to row data is:
With the Expression above, only Products with a width of 30 or below are displayed in the Report.