Example 1: DISPLAY ARRAY using full list mode

Form definition file "custlist.per":
SCHEMA shop 

LAYOUT
TABLE
{
 Id       Name         LastName 
[f001    |f002        |f003        ]
[f001    |f002        |f003        ]
[f001    |f002        |f003        ]
[f001    |f002        |f003        ]
[f001    |f002        |f003        ]
[f001    |f002        |f003        ]
}
END
END

TABLES
  customer 
END

ATTRIBUTES
  f001 = customer.id;
  f002 = customer.fname;
  f003 = customer.lname;
END

INSTRUCTIONS
  SCREEN RECORD srec[6] (customer.*);
END
Application:
SCHEMA shop 

MAIN

  DEFINE cnt INTEGER
  DEFINE arr DYNAMIC ARRAY OF RECORD LIKE customer.*

  DATABASE shop
  
  OPEN FORM f1 FROM "custlist"
  DISPLAY FORM f1

  DECLARE c1 CURSOR FOR
    SELECT id, fname, lname FROM customer 
  LET cnt = 1
  FOREACH c1 INTO arr[cnt].*
    LET cnt = cnt + 1
  END FOREACH
  CALL arr.deleteElement(cnt)

  DISPLAY ARRAY arr TO srec.*
    ON ACTION print 
       DISPLAY "Print a report"
  END DISPLAY

END MAIN