beautypg.com

Formula fields, Sql expression fields, To create an sql expression field – HP Intelligent Management Center Standard Software Platform User Manual

Page 123

background image

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.

SQL Expression fields

SQL expressions are like formulas, but they are written in Structured Query
Language (SQL), not in the 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.

To create an SQL Expression field

1.

On the Standard toolbar, click Field Explorer.

The Field Explorer dialog box appears.

2.

Scroll down to SQL Expression Fields and highlight it. Click New.

The SQL Expression Name dialog box appears.

3.

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

The Formula Workshop appears with the SQL Expression Editor active.

Crystal Reports 2008 SP3 User's Guide

123

6

Introduction to Reporting

Creating a new report