Presentation styles and data sources

When you define a DataWindow object, you choose a presentation style and a data source.

Presentation styles

A presentation style defines a typical style of report and handles how rows are grouped on the page. You can customize the way the data is displayed in each presentation style. Table 8-1 lists the presentation styles available.

Table 8-1: DataWindow presentation styles

Presentation style

Description

Tabular

Data columns across the page and headers above each column. Several rows are viewable at once.

Freeform

Data columns going down the page with labels next to each column. One row displayed at a time.

Grid

Row-and-column format like a spreadsheet with grid lines. Users can move borders and columns.

Group

A tabular style with rows grouped under headings. Each group can have summary fields with computed statistics.

Graph

Graphical presentation of data.

For examples of the presentation styles, see the User’s Guide.

Data sources

The data source specifies where the data in the DataWindow comes from and what data items are displayed. Data can come from tables in a database, or you can import data from a file or specify the data in code. For databases, the data specification is saved in a SQL statement. In all cases, the DataWindow object saves the names of the data items to display, as well as their data types.

Table 8-2: Data sources you can use for a DataWindow

Data source

Description

Quick Select

The data comes from one or more tables in a SQL database. The tables must be related through a foreign key. You need to choose only columns, selection criteria, and sorting.

SQL Select

You want more control over the select statement that is generated for the data source. You can specify grouping, computed columns, and so on.

Query

The data has already been selected and the SQL statement is saved in a query object that you have defined in the Query painter. When you define the DataWindow object, the query object is incorporated into the DataWindow and does not need to be present when you run the application.

Stored Procedure

The data is defined in a database stored procedure.

External

The data is not stored in a database, but is imported from a file (such as a tab-separated or dBASE file) or populated from code.