Expand the
Crystal
Reports node and click
User Function
Library.
Click
Next.
Enter the project name in
the Project name field.
Select the check box that
says "Generate the Java class that encapsulates all of the functions together,"
and then enter the package and class name.
You may want to write down the package
and class name because you will need this information later to configure the
IDE to recognize your UFL.
Click
Finish.
You are asked if you want to create a
new User Function.
Click
Yes.
Enter the following
information:
source folder name
package
class name
the function name (in lower case
letters)
return type
By default, the source folder and
package name are set to UFL project configuration.
Add any necessary input
arguments.
Click
Finish.
A new User Function class is added to
the project. The code required to add the class to the User Function Library
class is also generated.
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.