Running file jobs : Using parameters : Making expressions for ad hoc parameters

Making expressions for ad hoc parameters

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 2 types of ad hoc parameters available to Information Console users; Dynamic Filters and Query by Example (QBE). Dynamic Filters requests users to build expressions using a single operator. Query by Example (QBE) syntax requests users to select one or more operators to also build complex expressions.

Examples of using expressions in an ad hoc parameter:

n  
n  
n  
n  
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.
n  

Dynamic Filters are used in BIRT design and document files. QBE ad hoc parameters are used in BIRT Spreadsheet and e.Report files.

Using a dynamic filter operator

Dynamic filters appear in BIRT design and document files. When dynamic filters exist in an Actuate file, Information Console prompts the user to select from a list of operators and supply a value. The developer decides which operators are available in an Actuate file.

Dynamic filters support multiple values and complex string expressions, depending on the operator. Data matching this expression displays in the output document of the file job.

Figure 4-23 shows an example of using dynamic filter operators to make an ad hoc expression.

Figure 4-23  Using dynamic filters

Table 4-3 lists the operators that are available in Actuate files. Developers select which operators are available to users of the file.

Table 4-3  Dynamic filter operators 

The Like operator supports the following special characters:

n  
% 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.
n  

The Match operator is case sensitive and supports special metacharacters that combine to form text patterns called regular expressions. 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, 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 4-4 lists the metacharacters available to form regular expressions with the Match operator.

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 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 a $ sign, use \$.

Table 4-5 provides examples of dynamic filter expressions.

Using Query by Example operators

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 4-6 lists the operators available to form ad hoc parameter expressions.

Matches everything less than or equal to the value that follows the operator
Single quotation mark

(c) Copyright Actuate Corporation 2011