Chapter 6: Creating Custom Functions


Overview

One of the most-often heard questions from Crystal Reports users is How can I share a formula I write with other reports or with other Crystal Reports users? Often, too, a report designer will find a set of formula logic that is particular to their type of business or type of reports that must be used over and over again in many other formulas. The question then becomes, Is there any way of reducing the need to type these same parts of the formula over and over again?

In earlier versions of Crystal Reports, the solutions to these requirements typically weren t very elegant. Some users would open two reports side-by-side, reduce the size of the windows inside the Crystal Report designer, and drag a formula from one report to another. Others would open a report, edit a formula, copy the contents to the clipboard, and paste the contents to a new formula. Or a user might copy the contents of a formula in a report, close the first report, open a second report, create a new formula, and paste the formula text from the first report into the Formula Editor. Still others would keep their own library of formulas in a text file or word processing document, cutting and pasting between various formulas in various reports and this document on a regular basis.

Now, Crystal Reports makes this much easier by providing the ability to create your own reusable functions, called custom functions . Not only can custom functions be used over and over again in different formulas in the same report, but they can be added to the Crystal Reports repository for use in other reports and for use by other Crystal Reports users.




Crystal Reports 10
Crystal Reports 10: The Complete Reference
ISBN: B005DI80VA
EAN: N/A
Year: 2004
Pages: 223
Authors: George Peck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net