Creating Crystal Reports Formulas

Previous Topic: Report Syntax

To create a formula in Crystal Reports:

  1. From the Design View page, right-click Formula Fields and select New from the pop-up menu. The Formula Name dialog box appears.

  2. Type a name for the formula in the Name field.

  3. Click Use Editor. The Formula Workshop appears with the Formula Editor active.

  1. Verify that Basic Syntax is selected from the drop-down list.

  2. Enter the formula by typing in the components or selecting them from the component trees.

Tip!

Tip:
Press CTRL + SPACE to display a list box of available functions. If you've already typed some text, the list box will display only the functions that are possible matches for what you've typed. Double-click the function you want to add it to the Formula Editor.

  1. Click . If any syntax errors are found in your formula, a Crystal Reports ActiveX Designer dialog box appears, informing you of the problem.

  2. Fix any identified errors.

  3. When complete, click Close. A dialog box appears, asking you if you want to save your changes.

  4. Click Yes. Your new formula will appear in the Formula Fields section of the Design View page.

  5. To add the formula to your report, select and drag it to the location where you want it to appear on your report.

  6. Click Save and Close.

Next Topic: Casting Numbers as Currency

Back to Reports Table of Contents

Did you find this topic useful? Yes
No
I don't know
Why?