PreviousNextIndex

LAST-OF function

Returns a TRUE value if the current iteration of a DO, FOR EACH, or REPEAT . . . BREAK block is the last iteration for a particular value of a break group.

Syntax

LAST-OF ( break-group ) 

break-group
Example

This procedure uses LAST-OF to display a single line of information on each Item.CatPage group in the Item file, without displaying any individual item data. It produces a report that shows the aggregate value OnHand for each catalog page.

r-lastof.p
FOR EACH Item NO-LOCK BREAK BY Item.CatPage: 
  ACCUMULATE Item.OnHand * Item.Price (TOTAL BY Item.CatPage). 
  IF LAST-OF(Item.CatPage) THEN  
    DISPLAY Item.CatPage (ACCUM TOTAL BY Item.CatPage  
      Item.OnHand * Item.Price) LABEL "Value-oh". 
END. 

See also

FIRST function, FIRST-OF function, LAST function


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex