Crystal Reports for Rational Application Developer Designer Guide
Creating a new User Function
Before you can create a new User Function,
you must create a User Function Library to contain the function. For more
information, see
Creating a User Function Library (UFL).
If you already have a User Function
Library in your project, you can add a User Function to it.
To create a User Function
Right-click the UFL
project that you want to add the User Function to, point to
New and click
Other.
Expand the
Crystal
Reports node and click
User
Function.
Click
Next.
Enter the following
information:
source folder name
package
class name
function name (in lower case
letters)
return type
Add any necessary input
arguments.
Click
Finish.
A new User Function class is added
to the project.
The user function name and its
return type are specified as the return value of getIdentifier() and
getReturnType() methods in the User Function class, respectively.
Within the evaluate method
of the newly created User Function class, enter the logic of the function and
change the return variable.