home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 15.14. Introducing NextRow() and SameRow().
- NOTE: This is a code fragment... do not compile and use as-is!!
- 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()
- /*
- The same "meat" loop as before, but this time
- using two helpful mystery functions.
- */
- do while .not. vendor->(eof())
- if PageEject(page_len, top_mar, bot_mar)
- page_number++
- PageHead(sys_title, rpt_title, rpt_id, ;
- page_width, left_mar, right_mar, page_number)
- NextRow(2, left_mar, col_head1)
- NextRow(1, left_mar, col_head2)
- endif
- NextRow(1, left_mar, Vendor->Name)
- SameRow(2, Vendor->Address)
- SameRow(2, Vendor->YTD, "$9,999.99")
- SameRow(6, if(Vendor->Contract, "Yes", "No"))
- skip alias vendor
- enddo
- return nil
-
- // end of file CHP1514.PRG
-