Custom functions are procedures you create
in
Crystal Reports to evaluate, make calculations on, or
transform data. When you use a custom function in a formula, all the operations
in its definition are performed without you having to specify them individually
in the formula itself. Thus, the custom function provides a way for you to
share and reuse formula logic which, in turn, makes it easier and less time
consuming for you and your users to create reports.
For example, suppose you are designing a
series of reports from a database that stores department information with
three-letter code names, but you want the actual department names to appear in
your
Crystal Reports reports. Creating a formula to transform the
data would work, but you'd have to copy the formula logic from report to report
until you'd completed the series. It is much easier if you extract the logic
that does the data transformation and save it as a custom function. You can add
that custom function to each report in your series without having to reenter
the text.
Note: A custom function cannot
be placed directly in a report; it must be used as a part of a formula.