O'Reilly logo

Special Edition Using® Crystal Reports® 10 by Roger Sanborn, Steve Lucas, Kathryn Hunt, Joe Estes, Michael Voloshko, James Edkins, Bob Coates, Naisan Geula, Ryan Marples, Neil FitzGerald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required