The value of an ad hoc parameter can be a single value or an expression. Expressions use special characters called operators to select a group or range of values. For example, a greater than sign (>) specifies matching a value that is greater than the value that follows the symbol, as in >10. In this example, the greater than sign is the operator and 10 is the value.There are two types of ad hoc parameters available, Dynamic Filters and Query by Example (QBE). Dynamic Filters requests users to build simple expressions using a single operator. Query by Example (QBE) syntax requests users to select one or more operators to build simple and complex expressions.
A list of values, expressions, or ranges, separated by pipe signs, such as
10|20–30|>50. Some locales also accept a comma as a list separator.
A group of values, such as (abc|xyz), that a Boolean expression can combine, such as (abc|xyz)&bbb.Dynamic filters are used in BIRT design and document files. QBE ad hoc parameters are used in BIRT spreadsheet files.When an Actuate file prompts the user to select from a list of operators, the user selects one of the operators and supplies a value for the operator to use. This expression is used to select data to display in the document.Figure 3-4 shows an example of using dynamic filter operators.
Figure 3-4 Dynamic filters are available in BIRT design and document files. Table 3-1 lists the operators that are available in Actuate files. Developers select which operators are presented to users of the file.
Table 3-1 Greater than or equal to
% matches zero or more characters. For example, %ace% matches any value that contains the string ace, such as Ace Corporation, Facebook, Kennedy Space Center, and MySpace.
_ matches exactly one character. For example, t_n matches tan, ten, tin, and ton. It does not match teen or tn.The Match operator is case sensitive and supports special metacharacters that can be combined to form text patterns called regular expressions. Metacharacters can be combined to form complex matches. For example, using ^H.*(Gifts|Collectables)$ to search through a list of company names matches all companies whose name starts with the letter H, has one or more letters after H and includes the word Gifts or Collectables at the end of the name.If you need to match on a metacharacter itself, a backslash (\) followed by the metacharacter causes the search to interpret the metacharacter as a normal character. For example, if $ is part of the data to be found, it must be entered as \$ because $ is a metacharacter.Table 3-2 lists the metacharacters that can be used to form regular expressions with the Match operator.
Table 3-2 Matches the previous character zero or more times. For example po* matches Liverpool and Leipzig. Matches the previous character one or more times. For example, po+ matches Singapore and Liverpool but not Leipzig. Matches the previous character zero or one times. For example, po? matches Singapore and Leipzig. Matches the previous character exactly y times. For example, o{2} matches Liverpool but not Lyon. Matches the start of the string. For example ^A matches Australia but does not match Los Angeles. Used with a metacharacter to make it a literal character. For example, to search for a string containing the $ sign, search for \$. Table 3-3 provides examples of dynamic filter expressions.
Users build a QBE expression by combining operators and values, for example >10 is a QBE expression defining a value greater than ten. QBE expressions are available with BIRT Spreadsheet and e.Report files. Table 3-4 lists the operators that can be used to form ad hoc parameter expressions.
Table 3-4 Matches everything not equal to the search expression Matches everything greater than the value that follows the operator Greater than or equal to Matches everything greater than the value that follows the operator Matches everything less than the value that follows the operator Less than or equal to Matches everything less than or equal to the value that follows the operator Matches all characters in the set between the parenthesis Matches any character, group of characters, or no character Single quotation mark Converts an operator character in a string into a literal character
|
|
Copyright Actuate Corporation 2012 |