Print — Header

Headers can also be used as variable column labels. Here is an example of Inventory segmented part numbers:


Details on the print section:

  • seg.code header at norepeat skip
    • seg.code  — the name of the template record in the segment table
    • header at — header will print starting at the beginning of the column (which is listed under the nam5 row).
    • norepeat — we want to  print the code one time for all the matching inventory items.
    • skip — insert a blank line when the seg.code changes.
  • nam1 header at “seg1” shade repeat on code center
    • nam1 — the field name in the template record for the first segment (nvseg.nam1)
    • header at “seg1”will print nam1 starting at the column aliased as “seg1” (which id defined below the nam5 row).
    • We’re using an alias here. Without the alias, the statement would read:
      nam1 header at inv.seg1 shade repeat on seg.code center
      The inv.seg1 in the middle forces us to re-state the seg table for the code field, (code is in the seg table, not the inv table).
    • shade — shade the cell containing nam1. Shade (bordershaded) is the same grey scale as the default column labels.
    • repeat on code — the header will print when the seg.code changes. We could also write this as:
      repeat on code on page (printing the column header at the top of the next page)
    • center — center the text of the segment name in the real estate of the “seg1” column.
  • partno
    • the inventory record number and part number which will print for each row.
  • seg1 nolabel as “seg1”
    • seg1 — the first segment piece of the inventory part number (nvinv.seg1)
    • nolabel — we don’t want a column label to print since we are providing the variable column label from the segment template.
    • as “seg1” —  this sets the alias. The alias is equivalent to (nvinv.seg1).

So, what does it look like?


The BOLT segment template has 5 segments. The SHIM template has only 4,so the fifth column header label is blank. The normal column headings for the 5 segment columns are blank (nolabel).


   Page 1 — header
   Page 2 — no header
   Page 3 — multiple headers
   Page 4 — headers as sub-column labels