LAST-OF ( level )
|
DEFINE QUERY qCustomer FOR Customer SCROLLING.
QUERY qCustomer:QUERY-PREPARE("FOR EACH Customer WHERE Customer.CustNum > 50 BREAK BY Customer.Country BY Customer.Comments"). QUERY qCustomer:QUERY-OPEN. REPEAT WITH TITLE "Customers Break By Country and Comments": GET NEXT qCustomer. IF NOT AVAILABLE Customer THEN LEAVE. DISPLAY Customer.Country FORMAT "x(10)" Customer.Comments FORMAT "x(20)" QUERY qCustomer:FIRST-OF(0) LABEL "First" QUERY qCustomer:LAST-OF(0) LABEL "Last" QUERY qCustomer:FIRST-OF(1) LABEL "First Country" QUERY qCustomer:LAST-OF(1) LABEL "Last Country" QUERY qCustomer:FIRST-OF(2) LABEL "First Company" QUERY qCustomer:LAST-OF(2) LABEL "Last Company". END. |