When you create a filter, you define a condition that specifies 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 '2008-04-01 00:00:00' AND TIMESTAMP '2008-06-30 00:00:00'Figure 3-25 shows an example of a condition defined in Filter Conditions.
Figure 3-25 As Figure 3-25 shows, Filter Conditions helps you define the condition by breaking it down into the following parts:Table 3-3 lists the operators you can use when you create expressions for filter conditions.
Test if a column value is between two specified values. Test if a column value is equal to a specified value. > (Greater than) Test if a column value is greater than a specified value. >= (Greater than or equal to) Test if a column value is greater than or equal to a specified value. Test if a column value is in the specified set of values. Test if a column value is not a null value. A null value means that no value is supplied. Test if a column value is less than a specified value. <= (Less than or equal to) Test if a column value is less than or equal to a specified value. Test if a column value matches a string pattern. NOT BETWEEN Test if a column value is not between two specified values. <> (Not equal to) Test if a column value is not equal to a specified value. Test if a column value is not in the specified set of values. Country NOT IN ('USA', 'Canada', 'Mexico') Test if 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 on the Columns page. To create a filter for an aggregate column, use the Having page.
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 3-26 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 on the Parameters page.Figure 3-27 shows the completed filter condition.
Figure 3-28
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 |