In this section: |
The display commands LIST and PRINT list the individual values of the fields you specify in your report request. LIST numbers the items in the report. PRINT does not number the items.
You can easily display all of the fields in the data source by specifying an asterisk (*) wildcard instead of a specific field name, as described in Displaying All Fields.
For all PRINT and LIST requests, the number of records retrieved and the number of lines displayed are the same. In addition, there is no order to the report rows. The PRINT and LIST commands display all the values of the selected fields found in the data source in the order in which they are accessed. The order in which data is displayed may be affected by the AUTOPATH setting. For more information, see Optimizing Retrieval Speed for FOCUS Data Sources, and the documentation on SET parameters in the Developing Reporting Applications manual.
In general, when using PRINT or LIST, the order of the values displayed in the report depends on whether or not the field is a key field, as described in the Describing Data With WebFOCUS Language manual.
Alternatively, you can sort the values using the BY or ACROSS sort phrases. When LIST is used in a request that includes a sort phrase, the list counter is reset to 1 every time the value in the outermost sort field changes. For more information on sorting, see Sorting Tabular Reports.
PRINT * or PRINT SEG.* prints only the real fields in the Master File. To print virtual fields, explicitly reference them in the PRINT statement (PRINT * virtual field name). This is true even if the virtual field name is a re-defines of a real field.
For PRINT and LIST syntax, see How to Use Display Commands in a Request.
To display the values of individual fields, use the PRINT command. The following request displays the values of two fields, LAST_NAME and FIRST_NAME, for all employees.
TABLE FILE EMPLOYEE PRINT LAST_NAME AND FIRST_NAME END
The following shows the report output.
LAST_NAME --------- | FIRST_NAME ---------- |
STEVENS SMITH JONES SMITH BANNING IRVING ROMANS MCCOY BLACKWOOD MCKNIGHT GREENSPAN CROSS | ALFRED MARY DIANE RICHARD JOHN JOAN ANTHONY JOHN ROSEMARIE ROGER MARY BARBARA |
To number the records in a report, use the LIST command.
TABLE FILE EMPLOYEE LIST LAST_NAME AND FIRST_NAME END
The following shows the report output.
LIST ---- 1 2 3 4 5 6 7 8 9 10 11 12 | LAST_NAME --------- STEVENS SMITH JONES SMITH BANNING IRVING ROMANS MCCOY BLACKWOOD MCKNIGHT GREENSPAN CROSS | FIRST_NAME ---------- ALFRED MARY DIANE RICHARD JOHN JOAN ANTHONY JOHN ROSEMARIE ROGER MARY BARBARA |
WebFOCUS |