Release 10.1A: OpenEdge Reporting:
Query/Results for UNIX

> ## Defining array fields for reports

> There is a special type of field you can define in your reports, called an array field. An array field contains several elements of information within one field. Each element shares the same field name and characteristics (length, type, and so forth.). In Results, array fields are followed by brackets ([ ]). In this example, the Mnth-Quota[ ] field is an array field. This field contains the sales information for each month in a year (months 1-12).

> If you select an array for your report, Results can display the information in a stacked vertical format or spread out horizontal format.

> For example, if you select the Mnth-Quota[ ] field from the `Salesrep` file, the window appears as shown in Figure 5–2.

> Figure 5–2: Example one of an array field

> The window indicates how you can stack your information or spread it out. If the array contains text, you probably want to leave this line blank and press RETURN. This approach lets Results display the information under the column header as a paragraph in your report.

> However, the Mnth-Quota[ ] field contains information you want to display spread out. Enter the number of each month you want on your report, separated with commas. For example, if you want the monthly sales information for January through June, you would enter 1 through 6 with commas, as shown in Figure 5–3.

> Figure 5–3: Example two of an array field

> This lets Results display those months next to each other in separate columns
> (for example Mnth-Quota[1], Mnth-Quota[2], Mnth-Quota[3], and so forth). However, you might want to change the labels of the columns to give them more meaning. For example, you might want to change the label for Mnth-Quota[1] to January. To do this, select the Formats and Labels option under the Settings option. See the "Hiding repeating values and changing field formats and labels" section for more information on changing column labels.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095