Choosing a presentation style

The presentation style you select for a DataWindow object determines the format PocketBuilder uses to display the DataWindow object in the Design view. You can use the format as displayed or modify it to meet your needs:

When you create a DataWindow object, you can choose from the following presentation styles:

Using the Tabular style

The Tabular presentation style presents data with data columns going across the page and headers above each column. You can reorganize the default layout any way you want by moving columns and text. The number of rows that can display at one time is limited by the Windows CE screen. You can add scroll bars to the DataWindow control that holds the tabular DataWindow object.

Figure 17-3: DataWindow example showing a tablular report

Shown is a Data WIndow in tabular presentation style. It has columns for employee last name, salary, and life insurance. The life insurance column has a check box edit style.

Using the Freeform style

The Freeform presentation style presents data with data columns going down the page and labels next to each column. You can reorganize the default layout any way you want by moving columns and text. The Freeform style is often used for data entry forms. Figure 17-1 is an example of a DataWindow with a Freeform presentation style. Typically you would use this style to present detailed information about a particular record (row) in the database.

Using the Grid style

The Grid presentation style shows data in row-and-column format with grid lines separating rows and columns. With other styles, you can move text, values, and other objects around freely in designing the report. With the grid style, the grid lines create a rigid structure of cells.

An advantage of the Grid style is that users can reorder and resize columns during execution.

Original Grid report The grid report in Figure 17-4 shows employee information. Several of the columns have a large amount of extra white space.

Figure 17-4: Grid DataWindow

Shown is a Data WIndow with a grid presentation style. Grid lines separate the column headers and column data. In this picture, only the employee last name and phone columns are visible.

Grid report with modified column widths The grid report in Figure 17-5 was created from the original one by decreasing the width of some columns.

Figure 17-5: Grid DataWindow with column widths adjusted at runtime

Shown is a Data Window with a grid presentation style that has been widened to show three columns and parts of a fourth column. The columns displayed are first name, last name, salary, and part of the phone column.

Using the Group presentation style

The Group presentation style provides an easy way to create grouped DataWindow objects, where the rows are divided into groups, each of which can have statistics calculated for it. Using this style generates a tabular DataWindow object that has grouping properties defined.

This report groups employees by department and lists each employee’s salary. It also includes a subtotal for all department salaries in the trailer band for each group and a grand total for all salaries in the summary band.

Figure 17-6: Group DataWindow showing salaries by department

Shown is a Data Window with the Group presentation style. The data are grouped by department I D, and columns are shown for Department I D, Employee I D, and Salary. A sum of all salaries for a department displays near the bottom of the Data Window, as well as the grand total for all departments. A page count status line is visible in the Data Window footer.

For more about the Group presentation style, see Chapter 22, “Filtering, Sorting, and Grouping Rows.”

Using the Graph presentation styles

In addition to text-based presentation styles, PocketBuilder allows you to display information graphically using the Graph presentation style.

For more information about this presentation style, see Chapter 24, “Working with Graphs.”