
Note
To fully use queries requires a knowledge of set operations
(unions, intersections, and, or, complements, and any
combinations of these). Having a copy of the Hsqldb User Guide,
available from http://hsqldb.org/, is also extremely useful.
Creating reports
Reports provide information found in the database in a useful way. In
this they are similar to queries. Reports are generated from the
database’s tables or queries. They can contain all of the fields of the
table or query or just a selected group of fields. Reports can be static
or dynamic. Static reports contain the data in the selected fields at the
time the report was created. Dynamic reports can be updated to show
the latest data.
For example, a report on expenses for a vacation in the past should
probably be a static report because it is based upon specific data that
does not change. However, a report on the fuel data should probably
be a dynamic report, because this report depends upon data that does
change.
Caution
Dynamic reports update only the data that is changed or added
to a table or query. They do not show any modifications made to
the table or query itself. For example, after creating the report
below, open the fuel economy query created in the previous
section. For the "End-Reading".”Odometer – Fuel.”Odometer”
column, change the number 1 to the number 3. The report will
be identical before and after you make the change.
All reports are based upon a single table or query. So you need first to
decide what fields you want to use in the report. If you want to use
fields from different tables, you must first combine these fields in a
single query. Then you can create a report on this query.
For example, a report on vacation expenses includes both fuel costs
and meal costs. These values are contained in fields of two different
tables: Vacations and Fuel. So this report requires creating a query.
Creating a static report
We will create a report on vacation expenses. Certain questions need
to be asked before creating the report.
• What information do we want in the report?
302 Getting Started with OpenOffice.org 3.x
Comentarios a estos manuales