When you create a graphical report, you have the option to include a report grid, which is similar in appearance and function to the ACUCOBOL-GT standard grid control.
The report grid can be used when you want to display data in a standard column layout with a heading. Unlike the report table control, a report grid is always oriented with a heading row above one or more rows of data. The grid can be a single heading row with a single line of data (the grid is the result of one READ statement) or the grid can contain several rows of data (each grid line is the result of one READ statement).
Information about the code used to populate a grid with multiple rows of data can be found in Using Events to Populate a Report with Data.
The report grid Property window contains the following control-specific properties in addition to the properties described in Common Report Control Properties.
A drop-down box allows the selection of TRUE or FALSE. With a setting of TRUE (the default), a report grid automatically expands to fit the data content size. The FALSE setting should be used with caution. When this property is set to FALSE, the report grid uses the Lines property to determine its size, which may be inadequate to contain all your data.
A drop-down box allows the selection of TRUE or FALSE.
A setting of TRUE (the default) provides the user a place to enter a heading row for grid column titles.
A setting of FALSE removes the heading row. When Column Headings is set to FALSE, you can use the Page Header section of the report to provide the titles for the grid columns.
The Value cell for this property has an ellipsis push button that opens the Columns' Setting dialog box. Click the Add push button in this interface to add a row with the following default settings:
Column | Default Setting |
---|---|
Name | RwGd-1-Col-1 |
Pic | X(80) |
Width | 1.00 |
Align | Unaligned |
In the Name column, use the ellipsis push button to select a variable from graphical Working-Storage or from a data set. Set the Picture clause accordingly. In the Head column, type the column title. Width uses the unit of measure set in the Tools > Options > Report Writer > General interface. Use the Align column to set justification. Double-click in the More column to open a More dialog box, in which you can set Color, Font, and Hyperlink properties.
Repeat this procedure as needed for all of the fields you wish to have in your report grid.
The default setting for this property is foreground black on background gray. The Value cell for this property has an ellipsis push button that opens the Color Setting dialog box. Foreground and background colors can be set in this interface.
The Value cell for this property has an ellipsis push button that opens the Row Color Pattern dialog box. The Add push button in this interface opens the Color Setting dialog box, in which you can select background and foreground colors. You can observe your chosen pattern in the Preview area on the right of the Row Color Pattern interface.
Up and Down arrows permit you to rearrange color patterns you have defined, and a Remove button lets you delete color patterns.
Repeat this procedure to edit existing colors or to extend the Row Color Pattern.
A drop-down box allows the selection of TRUE or FALSE. A setting of TRUE (the default) causes subsequent lines in a grid to be separated by a line. A setting of FALSE removes all grid lines in the grid.