NEXT-LISTING
Syntax
NEXT-LISTING[NO-ADVANCE] [SKIPLINES={num_lit|_var|_col}] [NEED={num_lit|_var|_col}]
Description
Ends the current set of detail lines and begins another.
NEXT-LISTING is used in tabular reports. This command causes a new vertical offset in the page to begin.
After NEXT-LISTING is executed, line 1 is reset one line below the deepest line previously printed in the page body. That is, if you then write PRINT (1, 5), the string is printed on the next available line starting in column 5. Note that the SQR-reserved variable #current-line still reflects the actual line number within the page body.
The value of SKIPLINES must be a nonnegative integer. If it is less than 0 (zero), then 0 is assumed.
The value of NEED must be an integer greater than 0. If it is less than or equal to 0, then 1 is assumed.
Parameters
| Parameter | Description |
|---|---|
|
NO-ADVANCE |
Suppresses any line movement when no printing has occurred since the previous NEXT-LISTING or NEW-PAGE. The default increments the line position even when nothing was printed. |
|
SKIPLINES |
Causes the specified number of lines to be skipped before setting up the new offset. |
|
NEED |
Specifies the minimum number of lines needed to begin a new listing or set of detail lines. If this number of lines does not exist, a new page is started. You can use NEED to prevent a group of detail lines from being broken across two pages. |
Example
The following example shows the NEXT-LISTING command:
begin-select
cust_num (1,1) edit 099999 ! Each detail group prints
city (,+3) ! starting on line 1 since
name (2,10,30) ! NEXT-LISTING keeps
address (,+2) ! moving line 1 down the
next-listing skiplines=1 need=2 ! page. NEED=2 keeps 2
from customers order by cust_num ! line detail groups from
end-select ! breaking across pages.
Note:
The NEXT-LISTING command automatically issues a Use-Column 1 command if columns are active.