AcrossValues Attribute
Data Type: array of QueryCol
4GL Access: RW
The AcrossValues attribute stores the array of values on which the returned data is based. These values are represented as the column headers in ColumnCross style and are repeated as rows in RowCross style.
In RowCross style, each of these values is repeated for each unique row identifier, whether there is a corresponding value for the AcrossValue attribute in the database. The same number of rows is, therefore, always returned for each row identifier. If a row identifier has no aggregate value for a particular value in this array, null is returned.
See the
RowCross Class and examine the two tables in that section. The first table is an example of a data set that forms the basis of the RowCross style of the second example. The values represented by the AcrossValue attribute (blue, green, red, and yellow) are repeated for each unique identifier (abc and xyz), even though abc has no aggregate value for yellow and xyz has none for green.
You need not specify the values for the AcrossValues attribute if you want to return all the values in the named column in default sort order. If this default arrangement is acceptable, you need to provide only the value for the CrossColumn attribute. The SetCols and Open methods of the DataStream object fetch the values for the AcrossValue attribute directly from the database column specified for the CrossColumn attribute.
If, however, you want to specify a subset of values stored in the CrossColumn attribute or a nondefault sort order, you must specify the values for this attribute. For example, if the value of your CrossColumn attribute is month, you probably want other than an alphanumeric ordering (for example, Jan, Feb, Mar rather than Feb, Jan, Mar). You also might want to list only months for one quarter rather than for the entire year.
For more information about arranging data in CrossTable style, see the following classes:
ColumnCross Class and
RowCross Class.
Last modified date: 06/25/2024