home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 15.7. Getting column headings on every page.
- Author: Craig Yellick
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- #define TOP_MAR 4
- #define BOT_MAR 6
- #define PAGE_LEN 66
-
- function Main()
- /*
- Same vendor listing as before, but this time
- print the column headings on every page and use
- the nifty PageEject() function to help out.
- */
- use vendor new
- goto top
- set device to printer
- setprc(0,0)
- @ prow() +TOP_MAR, 0 say "Vendor Name"
- @ prow() +1, 0 say "--------------------"
- do while .not. vendor->(eof())
- if PageEject()
- @ prow() +1, 0 say "Vendor Name"
- @ prow() +1, 0 say "--------------------"
- endif
- @ prow() +1, 0 say vendor->Name
- skip alias vendor
- enddo
- eject
- set device to screen
- quit
- return nil
-
- // end of file CHP1507.PRG
-