如何在vfp中控制打印机的以下功能
1.换行,换多行
@ PROW( ), PCOL( ) + 12 SAY 'Contact person'
@ PROW( ), $+12 SAY 'Contact person'
2.退行,退多行
@ PROW( ), PCOL( ) - 12 SAY 'Contact person'
@ PROW( ), $-12 SAY 'Contact person'
3.换页
EJECT PAGE
PROW( ) FunctionSee Also
@ ... SAY | COL( ) | PCOL( ) | ROW( )Returns the current row number of the printer's print head.
PROW( )
Return Values
Numeric
Remarks
If you issue EJECT, Visual FoxPro resets PROW( ) to 0.
PROW( ) is especially useful for relative addressing of printed text.
Example
In the following example, the two commands return the same result. You can use the $ operator in place of PCOL( ). Both $ and PCOL( ) return the current column position of the printer.
@ PROW( ), PCOL( ) + 12 SAY 'Contact person'
@ PROW( ), $+12 SAY 'Contact person'
EJECT PAGE CommandSee Also
EJECT | ON PAGE | SET ALTERNATE | SET DEVICE | SET PRINTER | PCOL( ) | PROW( ) | System Variables Overview
Sends a conditional page advance to the printer.
EJECT PAGE
Remarks
Use EJECT PAGE to advance streaming output. The advance depends on the value of _PADVANCE and if an ON PAGE routine is in effect.
If _PADVANCE is set to FORMFEED and an ON PAGE routine isn't in effect, EJECT PAGE performs the following:
Sends a formfeed to the printer if the printer is online.
Sends linefeeds, as determined by the system memory variables _PLENGTH and _PLINENO, to the screen or to an alternate file or to both.
Increments _PAGENO by 1.
Sets _PLINENO to 0.
If the system memory variable _PADVANCE is set to LINEFEEDS, and if an ON PAGE routine is in effect and _PLINENO is less than the page line number specified in the ON PAGE routine, EJECT PAGE sends to the printer, to the main Visual FoxPro window, or to an alternate file or to both, as many linefeeds as needed to advance to the top of the next page.
If an ON PAGE routine is not in effect, or if _PADVANCE is set to LINEFEEDS and _PLINENO is greater than the page line number specified with ON PAGE, EJECT PAGE does the following:
Sends linefeeds, as determined by the system memory variables _PLENGTH and _PLINENO, to the printer, the main Visual FoxPro window, or to the alternate file or to both.
Increments _PAGENO by 1.
Sets _PLINENO to 0.
ON PAGE CommandSee Also
EJECT PAGE | DO Command | _PLINENO System Variable
Specifies a command that executes when printed output reaches a specified line number in a report or when you issue EJECT PAGE.
ON PAGE [AT LINE nLineNumber [Command]]
Parameters
AT LINE nLineNumber [Command]
Specifies the command to execute at the designated line number. The specified command executes when _PLINENO, the system variable that keeps track of the current line number in a report, becomes greater than the line number specified with nLineNumber. The command specified with ON PAGE also executes when you issue EJECT PAGE. For more information, see EJECT PAGE.
Remarks
ON PAGE typically uses DO to execute a procedure for handling page breaks, headers, and footers.
Executing ON PAGE without the AT LINE clause clears the ON PAGE command.