Share via


Formula Expert

Use the Formula Expert to create a Formula based on an existing custom function. The expert appears when you click Use Expert in the Formula Name dialog box, or when you select a simple formula in the Formula Workshop without selecting the Toggle Properties Display button.

The Formula Expert also appears when you edit an empty formula field or a formula field that makes a simple call to a custom function.

Custom Function Supplying Logic This list includes all the custom functions available in your report (Report Custom Functions). Select a custom function to base your new formula on.

When you select a custom function, the Summary, Return Type, and Function Arguments areas are filled in based on the function's definition.

Summary This area contains the summary that has been defined for the custom function in the Custom Function Properties dialog box. The summary information is only for reference and cannot be modified.
Return Type This area contains the data type that the selected custom function will return. The return type information is only for reference and cannot be modified.
Reset Values Click this button to reset values you've entered in the Value fields of the Function Arguments area. If an argument has a set of default values, the value is reset to the first default value. If an argument has no default values assigned, the value is reset to "Select Field or Enter Value" (that is, the value is unbound). If an argument is optional, it is set to "Use Optional Value:" followed by the current value of the optional value defined in the custom function.
More Info Click this button to see more information about the selected custom function.
Function Arguments This area contains the arguments defined for the custom function. Most of the argument information is only for reference and cannot be modified.

However, the Value field is where you specify the argument value for the formula you are creating. You can enter a value directly, or you can click the Value field and select from the list that appears. You can choose from possible values (the choices you see are specific to the argument's data type):

  • A set of default values created in the Custom Function Properties dialog box. You can save the formula without selecting a value; the first default value from the set is used.
  • An optional value as specified in the custom function. This choice appears as the text "Use Option Value" followed by the current value of the optional value defined in the custom function. You can save the formula without selecting a value; the optional value is used.
  • A field of the type that matches the selected argument's type (that is, if the argument's type is string, you can pick a string field). The field must be used in the current report for it to appear in this list.
  • True or False for arguments with a Boolean data type.
  • A formula field or SQL Expression whose return type matches the selected argument's type. The formula or expression must exist in the Formula Workshop dialog box, but does not have to be used in the report for it to appear in this list.
  • A running total whose summary field's type matches the selected argument's type. The running total must exist in the Field Explorer, but does not have to be used in the report for it to appear in this list.
  • A parameter field whose value type matches the selected argument's type. The parameter must exist in the Field Explorer, but does not have to be used in the report for it to appear in this list.
  • A group name. The group must exist in the current report for it to appear in this list.
  • A constant value. For some types, such as string or number, you can enter a simple constant value directly. For others that require specific formatting, such as date, date and time, and so on, a version of the Enter Value for dialog box appears so you can choose a value or range.
  • Another field. Click Choose Other Field to see the Choose Field dialog box, which displays only the report and database fields of the type that matches the selected argument's type.

See Also