In cases other than selection and search formulas which you can define using the Select Expert and the Search Expert you create all formulas in the Formula Editor of Crystal Reports.
Accessing the Formula Editor
The Formula Editor appears.
The Formula Editor contains four main windows.
Window | Description of contents |
---|---|
Report Fields | Report fields include all database fields accessible for your report. They also include any formulas or groups already created for the report. |
Functions | Functions are pre-built procedures that return values. They perform calculations such as average, sum, count, sin, trim, and uppercase. |
Operators | Operators are the "action verbs" you use in formulas. They describe an operation or an action to take place between two or more values.
Examples of operators: add, subtract, less than, and greater than. |
Formula text window | Area where you create a formula |
The top right corner of the Formula Editor contains a drop-down list where you can choose between Crystal and Basic syntax for the formula you are creating.
Changing the syntax from Crystal syntax to Basic syntax or vice versa will change the list of functions in the Functions window as well as the list of operators in the Operators window. The functions and operators differ from syntax to syntax.
The available report fields remain the same since the report fields are available to both syntaxes.
The Report Fields, Functions, and Operators trees at the top of the Formula Editor contain the primary formula components. Double-click any component to add it to your formula.
Inserting Formulas | Customizing Record Selection with Formulas