C5_EJECT

 EJECT
 Advance the printhead to top of form
------------------------------------------------------------------------------
 Syntax

     EJECT

 Description

     EJECT is a printing command that sends a formfeed character (CHR(12)) to
     the printer and sets the PCOL() and PROW() values to zero.  If you
     address a printer row less than the last row position since an EJECT or
     SETPRC() was executed, Clipper automatically performs an EJECT.
     Because of this, your printing logic must proceed sequentially from left
     to right down the page.  If you need to reset the internal printer row
     and column values to zero without sending a formfeed, use SETPRC().

 Examples

     .  This example prints a simple list report and uses EJECT to
        advance to a new page when the line counter reaches the maximum
        number of lines to print per page:

        LOCAL nLine := 99, nPage := 0
        USE Sales NEW
        SET PRINTER ON
        SET CONSOLE OFF
        DO WHILE !EOF()
           IF nLine > 55
              EJECT
              ? "Page " + LTRIM(STR(++nPage, 3))
              ? "Date " + CTOD(DATE())
              ?
              ? "Salesman", "Amount"
              ?
              nLine := 6
           ENDIF
           ? Sales->Salesman, Sales->Amount
           nLine++
           SKIP
        ENDDO
        SET PRINTER OFF
        SET CONSOLE ON
        CLOSE

 Files   Library is CLIPPER.LIB.

See Also: ISPRINTER() PCOL() PROW() SET CONSOLE SET DEVICE



Advertisements

3 responses to “C5_EJECT

  1. Pingback: C5_SET PRINTER | Viva Clipper !

  2. Pingback: CL5 Printing | Viva Clipper !

  3. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.