Help: Working with the Expression Builder |
There are two function builders which provide guided interfaces to help the user construct sound Java and SQL expressions.
The information below covers creating Java expressions. (For information on SQL functions see Report Definitions — Using the Calculation Builder.)
You can type an expression into a field, or use the Expression Builder to guide your selection and check your work. The Expression Builder helps you locate functions and complete parameters to functions in a natural language format. From the full Expression Builder form, click:
1. Type the expression
You can enter all or part of the expression in the large text area by typing, including functions, operators, constants, and property references or linked property references. GRP-40965.
2. Choose a library
To include a function in your expression, select a library from the list that is likely to contain the desired function. The form changes to list the functions in that library and the parameters for each function.
Choose built-in
as the library to access the built-in functions @abs()
, @and(),@average(), @exp()
, @if()
, @java()
, @max()
, @min()
, @or()
, @round()
, @sqr()
, @sqrt()
, @sum()
and @when()
. Internally, these are not part of a library. R-20768 C-2413
3. Choose a function in the library
The selection area lists the functions in the selected library alphabetically, with a description of each.
4. Supply values for function arguments
If the selected function requires arguments, you are prompted for each argument value. (Output arguments are listed without a place for input.)
If you don't yet know the property, expression, function, or other value, enter a constant for the argument.
5. Insert the function call into the expression and validate
Click Insert to insert the function call and your arguments into the expression.
Click Validate to check the syntax of the expression. (This does not check whether properties you reference in the expression are defined.) B-19030
Click Cancel to close the form and return to the previous form without changes.
6. Optionally, extend the expression
When an expression is complete and valid, click Save .
To extend a saved expression, select a portion of it and start the Expression Builder again.
Examples
Constants in expressions
Functions in expressions
Operators in expressions
Linked properties