When you create a filter, you define one or more conditions that specify which data rows to return. A filter condition is an If expression that must evaluate to true in order for a data row to be returned. For example:WHERE OrderTotal > 10000 AND SalesOffice LIKE 'San Francisco%' AND OrderDate BETWEEN TIMESTAMP '2012-04-01 00:00:00' AND TIMESTAMP '2012-06-30 00:00:00'Figure 2-10 shows an example of a condition defined in Filter Conditions. Filter Conditions helps you define the condition by breaking it down into the following parts:
Figure 2-10 Table 2-2 lists the operators you can use when you create an expression for a filter condition.
A column value is between two specified values. A column value is equal to a specified value. A column value is greater than a specified value. >= (Greater than or equal to) A column value is greater than or equal to a specified value. A column value is in the specified set of values. Country IN ('USA', 'Canada', 'Mexico') A column value is not a null value. A null value means that no value is supplied. A column value is less than a specified value. <= (Less than or equal to) A column value is less than or equal to a specified value. A column value matches a string pattern. NOT BETWEEN A column value is not between two specified values. <> (Not equal to) A column value is not equal to a specified value. A column value is not in the specified set of values. Country NOT IN ('USA', 'Canada', 'Mexico') A column value does not match a string pattern.
Select a column from the drop-down list. The drop-down list contains the non-aggregate columns that you defined in Columns. To create a filter for an aggregate column, use Having.
4 Select the comparison test, or operator, to apply to the selected column or expression. Depending on the operator you select, Filter Conditions displays one or two additional fields, or a completed filter condition.
5 If you selected an operator that requires a comparison value, specify the value in one of the following ways:
If you selected a column in Filter by, choose Select Value to select from a list of values. Figure 2-11 shows the selection of Boston from a list of possible sales office values.
Select a parameter or column from the drop-down list. You create parameters in Parameters.Figure 2-12 shows the completed filter condition.
Figure 2-13
6 Display the Actuate SQL query. Verify that the filter condition is appended to the WHERE clause and that the syntax is correct, for example:
|
|
Copyright Actuate Corporation 2012 |