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.
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.
Should point out that AFAIK this is OpenEdge 10 functionality and won't work in version 9 if you're using it. But then why would you be as it's obsolete?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.