When creating formulas, you have the option of using either Crystal or Basic syntax. Almost any formula written with one syntax can be written with the other. Reports can contain formulas that use Basic syntax as well as formulas that use Crystal syntax.
To insert a formula into a report
- In the Field Explorer, right-click Formula Fields and click New.
Tip To display the Field Explorer, click the View menu, point to Other Windows, and click Document Outline.
- In the Formula Name dialog box, enter a name for your formula.
- Click OK.
- In the Formula Editor dialog box, choose either Crystal or Basic syntax.
- Enter the formula by typing and by selecting components from the component trees.
Tip 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. See Formula Editor.
- Click the Check button to identify any errors in the formula.
- Fix any syntax errors identified by the Formula Checker.
- When the formula has the correct syntax, click the Save and close button.
Your formula now appears in the Field Explorer, under Formula Fields.
- Drag the formula to position it where you want it to appear on your report.
Note A formula that is placed on a report is indicated by the @ prefix (for instance, @ProcessTime).