Selecting fields

To select a field from the list of available fields, highlight the desired field and press enter.

If the field you selected is larger than 99 characters, the Field Range window is displayed so you can specify a range of characters to be printed for that field. See Ranging a selected field for details.

Selecting an arrayed field

If the field you select is an arrayed field (its type and size are preceded by an asterisk in the list of available fields), the Field Subscript window is displayed. This appearance of this window differs depending on the number of dimensions in the array. The maximum number of dimensions is four.

1. Defining subscript information.

In each dimension field (First dimension, Second dimension, and so on), do one of the following:

When a field is used as a subscript, you must specify it by its name, not its description. If another field in another file has the same name, the filename, followed by a period (.), must precede the field name (for example, PRODUCT.TAX, where PRODUCT is the filename and TAX is the name of the field).

If a field’s file has more than one structure assigned to it, the structure name may need to be specified between the filename and the field name to avoid ambiguity. The filename, the structure name, and the field name must be separated by periods.

Note

To prevent a runtime “Invalid Subscript specified” error, make sure that numeric fields used as subscript values will contain data that is within the proper bounds. Use selection criteria to impose the correct range, if necessary.

For the arrayed field shown in figure 1, two dimension fields (First dimension and Second dimension) appear in the Field Subscript input window. In a two‑dimensional array, the total number of elements in four. (The [2,2] after the field name indicates that the array has two rows and two columns.) Entering 1 in the First dimension field and 2 in the Second dimension field specifies that this report field references the second element of the first dimension, as illustrated in figure 2    

2. An arrayed field with two dimensions.

Ranging a selected field

If the size of the field you select is larger than 99 characters, the Field Range window is automatically displayed. (See figure 3.) Because the maximum field size supported in ReportWriter is 99 characters, you must specify a subset, or range, of characters to use. However, you can specify ranging for smaller fields as well, when you want to print only part of the data.

Enter data in each field as instructed below.

Offset

Enter the starting character position for this range within the field’s data size, or press the List selections shortcut to select a field to use as a variable offset (which is base one from field position one).

Length

Enter the length of the range within the field’s data size, or press the List selections shortcut to select a field to use as a variable length. The range length cannot exceed 99 characters or the result of the following operation:

field data size – offset + 1   

3. Defining ranging information.

When a field is used as an offset or length, you must specify it by its name, not its description. If another field in another file has the same name, the filename, followed by a period (.), must precede the field name (for example, PRODUCT.TAX, where PRODUCT is the filename and TAX is the name of the field).

If a fields file has more than one structure assigned to it, the structure name may need to be specified between the filename and the field name to avoid ambiguity. The filename, the structure name, and the field name must be separated by periods.