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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.