Introducing the Formula Editor
The Select Expert is a very helpful tool for selecting one or more fields using the basic comparison operators. This is probably adequate for many of the reports you write, but what about the reports where you need to build more complex filtering criteria? For those reports, there is the Formula Editor. Using the Formula Editor and writing formulas is described in complete detail in the next few chapters, but here is a summary of how to use it.
The Formula Editor lets you use the built-in programming language (either Crystal syntax or Basic syntax) to create sophisticated selection formulas. There is a large library of functions to choose from for building a selection formula.
There are two ways to enter a custom formula. The first way is to click the Show Formula button. This shows the existing formula built using the fields already selected. You can change this formula directly so that it matches the selection criteria you need. If you can’t remember the different built-in functions well enough to type them in directly, click on the Formula Editor button. This brings up the Formula Editor dialog box and you can use it as a reference tool to build the formula. The second way to enter a formula is to click on the comparison list dropdown list and at the very bottom is an item called formula:. Clicking on this item changes the right side to a multi-line text box that lets you type a formula from scratch.