Export (0) Print
Expand All

Inserting Formulas

Visual Studio .NET 2003

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

  1. 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.
  2. In the Formula Name dialog box, enter a name for your formula.
  3. Click OK.
  4. In the Formula Editor dialog box, choose either Crystal or Basic syntax.
  5. 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.
  6. Click the Check button to identify any errors in the formula.
  7. Fix any syntax errors identified by the Formula Checker.
  8. When the formula has the correct syntax, click the Save and close button.

    Your formula now appears in the Field Explorer, under Formula Fields.

  9. 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).

See Also

Creating Formulas with Basic Syntax | Creating Formulas with Crystal Syntax | Selection Formula Runtime Customization

Show:
© 2015 Microsoft