Formula fields

To display data that is a calculated value, you need to create a formula field and place that formula field on the report. For example, if the database only stores the order dates and ship dates for orders but you need to display the number of days it takes to ship the order, you must create a formula field that will calculate the number of days between ordering and shipping. This is just one example of the use of formula fields. See Using Formulas, for an introduction to formulas.

Running total fields

To display a total that evaluates each record and provides a running sum of all the values in a field (or all the values in a certain set of values), a running total field needs to be created and placed in the report. If the first three values in a field were 2, 4, and 6, a running total would print 2, and then 6 (the sum of 2 + 4), and then 12 (the sum of 2 + 4 + 6). See Running Totals, for an introduction to running totals.

Picture fields

When designing reports, there will be times when you want to include a picture. For example, you may wish to put a company logo in the report header.

To insert a picture
  1. On the Supplementary toolbar, click Insert Picture.

    The Open dialog box appears.

  2. Select the desired picture file from the file list and click Open to return to the report.

    An object frame appears with the picture inside, ready to be positioned.

  3. Position the picture object where you want it to appear in the report and right-click once.

SQL Expression fields

SQL expressions are like formulas, but they are written in Structured Query Language (SQL), not in the Seagate Crystal Reports formula language. An SQL expression can be used to query the database for specific sets of data. You can sort, group, and select based on SQL expression fields. See The Crystal SQL Designer, for an introduction to SQL expressions.

When an SQL/ODBC data source is used to design a report, the program adds SQL Expressions Fields to the Field Explorer dialog box. This new option allows SQL expressions to be entered in the Field Explorer and then inserted into a report quickly and efficiently.

To create an SQL Expression field
  1. On the Standard toolbar, click Insert Fields.

    The Field Explorer dialog box appears with Database Fields selected.

  2. Scroll down to SQL Expression Fields and double-click it.

    The SQL Expression Name dialog box appears.

  3. Enter a name in the Name box, and then click OK.

    The SQL Expression Editor appears.

    Note:    The SQL Expression Editor functions in the same way as the Formula Editor. For a discussion of these tools seeFormula components and syntax.

  4. Type the expression in the SQL Expression Editor.
  5. Click OK.


Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com