Operation Manual

Introduction to Reporting
Creating a new report
6
98 Crystal Reports User’s Guide
Placing data on the report
Placing data on a report is a very important task. You need to know what type
of data should be placed on the report and where on the report it should be
placed.
Database fields
Much of the data placed on a report are database fields, displaying data as it
is stored in the database. For example, in the “Quick start for new users” on
page 48, the Customer Name, City and Country fields are placed on the
report. Normally, database fields will be placed in the Detail section, but under
certain circumstances, they will be placed in other sections of the report.
u
To insert a database field
1. On the Standard toolbar, click Field Explorer.
The Field Explorer dialog box appears. To speed the report building
process, this dialog box remains on-screen until you close it. You can
move this dialog box wherever you wish.
2. Expand the Database Fields folder to see all the tables chosen from the
database(s).
3. Expand the individual tables to see all the fields they contain.
4. Select the field you want to appear in the report.
5. Click Browse to review the values in the selected field.
6. Click Insert to Report to place it in the report.
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” on page 417,
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.