Crystal Reports in the Real World—Custom Functions

As described in Chapter 4, custom functions can be prepared in advance and can be stateless so they can be used later in a variety of ways. In the next example, a name formula is created in such a way that it builds and formats names in a consistent and reusable manner.

→ For more detailed information on how custom functions can be prepared in advance, seeNavigating the Formula Workshop with the Workshop Tree,” p. 95

1.
Open the Employee Profile report. From the Field Explorer, select Formula Fields and click New. Give the formula the name Title and click Use Editor. Enter the following text into the code window of the formula editor:
 If InStr(LowerCase({Employee.Notes}), " he ")>0 Then ...

Get Special Edition Using® Crystal Reports® 10 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.