The Report Table

In a graphical report, the report table allows you to format your detail section in a grid-like table. This control is not available in character reports.

At its simplest, a report table displays the result of a single READ statement (or equivalent) with corresponding header information. You can control whether the data is printed with a horizontal or vertical orientation. This can provide a useful way to align and group header and body information.

A report table can also be used to display images. Any cell in a table can be associated with an image file or image variable. The use of an image variable in a table is demonstrated in the Report1f sample program. In the sample, a group section has been established to organize the report data by state. A table displayed in the group header shows an image of the state flag associated with the selected state.

Additionally, a report table can be used to display multiple lines and columns of literal values. Multiline labels are not supported in reports, but a multiline table with no grid lines or border can be used to create the effect of a multiline label.

The report table Property window contains the following control-specific properties in addition to the properties described in Common Report Control Properties.

Bitmap Path

A drop-down box allows the selection of Full Path, Dynamic Full Path, and User Defined. These property selections affect how the bitmap file is located.

With the Full Path setting (the default), the browser uses the full path of the bitmap (as recorded when it was selected in the Report Composer) to locate the bitmap file.

When you set this property to Dynamic Full Path, a call to the C$FULLNAME library routine is used to derive the full path of the bitmap file. The bitmap can be stored in any of the FILE-PREFIX directories named. The browser uses the full path of the bitmap to locate the bitmap file.

With the User Defined setting, the browser searches for the bitmap in the same directory as the HTML file.

Note that in the Table Setting dialog, the Cell Setting tab has a Type column, in which you can indicate that a table cell should contain an image. The Cell Setting tab then allows you to locate the bitmap file which should be displayed in that cell.

The Bitmap Path property applies to all image files so designated in the table.

Cell Padding

Cell padding adds blank space between the text in a cell and the horizontal grid lines above and below that text. The unit of measure for this property is pixels. Values of 1 through 5 are permitted, with a default value of 1.

Cell Spacing

Cell spacing adds blank space between the vertical grid lines and horizontal grid lines in a table cell. The unit of measure for this property is pixels. Values of 1 through 5 are permitted, with a default value of 1.

Merge Cell

Merge Cell lets you remove column dividers from a row.

The Value cell for this property has an ellipsis push button that opens the Merge Cell dialog box. In this interface, click the left-most column of the adjacent columns you wish to merge, and drag your mouse across the columns you want to merge. Click Merge Cell and OK to return to the Report Composer window.

To restore the columns to the way they were, select the merged cell and click the Recover Cells push button.

Note that the Merge Cell operation removes any column titles or values from the selected columns. A Restore Cell operation restores the individual cells that you merged, but maintains only the title or value of the left-hand cell where you started the merge operation. Restore Cell is not an undo operation.

Also note that if you perform a Merge Cell operation on a table, you cannot subsequently perform the Table Rearrange function.

Show Grid Line

A drop-down box allows the selection of TRUE or FALSE. A setting of TRUE (the default) causes table cells to be separated by a grid line. A setting of FALSE removes all grid lines inside the table.

Table Rearrange

A table may be rearranged in any number of ways by row or by column and still retain an identical number of cells. For example, a 4 x 2 cell table may be rearranged as a 2 x 4, a 1 x 8, or an 8 x 1 cell table.

The Value cell for this property has an ellipsis push button that opens the Table Rearrange dialog box.

In a column measure rearrangement, the cells are selected from left to right, top to bottom, and reconfigured so that the same cells are displayed top to bottom, left to right.

In a row measure rearrangement, cells are selected from top to bottom, left to right, and reconfigured so that the same cells are displayed left to right, top to bottom.

Note that the Table Rearrange function is disabled if a Merge Cell operation has been performed.

Table Setting

The Value cell for this property has an ellipsis push button that opens the Table Setting dialog box, with tabs for Column Setting, Row Setting, and Cell Setting.

The Column Setting tab lets you set column width, alignment, color, color variable, and font. In the Row Setting tab, you can set row height, alignment, color, color variable, and font. The Cell Setting tab lets you set each cell’s type, data, pic, and alignment, along with elements in the More dialog.