Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing is delayed
Message
De
19/02/2002 17:05:15
 
 
À
19/02/2002 16:52:20
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00622199
Message ID:
00622210
Vues:
16
I remember having this problem long, long ago. Don't remember exactly what i did to get around it. Here is the FP2.6 Help file description for SET PRINTER. Seems like it had something to do with that.

Enables or disables output to the printer and routes output to a file or a port.

Syntax
SET PRINTER ON [PROMPT] | OFF
or
SET PRINTER TO
	[<file> [ADDITIVE] | <port>]
or
SET PRINTER TO
	[\\<machine name> \<printer name> = <dest>]
or
SET PRINTER TO
	[\\SPOOLER [\N] [\F=<expN>] [\B=<banner>] [\C=<expN>] [\P=<expN>]]
	[\S=<server>]
	[\Q=<queue>]

Remarks

These commands let you turn output to a printer on or off and direct the output to a file, port or network printer. 

Clauses

ON [PROMPT]

Include ON to enable output to the printer.  Output formatted with  @ ... SAY isn't routed to the printer when SET PRINTER is ON.  Use SET DEVICE TO PRINTER to direct output from @ ... SAY to the printer.
In FoxPro for Windows and FoxPro for Macintosh, you can include the optional PROMPT clause to display a dialog before printing starts. In this dialog you can adjust printer settings, including the number of copies and page numbers to print. The printer settings that you can adjust depend on the currently installed printer driver. Place the PROMPT key word immediately after TO PRINTER.  PROMPT is ignored in FoxPro for MS-DOS.

OFF

Include OFF to disable output to the printer.  This is the default setting.

TO 
	[<file> [ADDITIVE] | <port>]

You can specify a file or a port where output is directed with SET PRINTER TO.  To direct output to a file, specify a file name with <file>.  Output is appended to the existing contents of the file if you include ADDITIVE.  Any existing contents of the file are overwritten if you omit ADDITIVE.  
To send output to different local printers,  you can specify one of three parallel ports in FoxPro for MS-DOS and FoxPro for Windows (LPT1, LPT2 or LPT3) or one of two serial ports in all FoxPro versions (COM1 or COM2) with <port>.  
In FoxPro for Macintosh, you can specify COM1 or COM2 for the <port>. Include COM1 to specify the modem port or COM2 to specify the printer port. You can also specify the port settings with the following six parameters.

Parameter	Values

<baud rate>	300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 19200, 57600
<parity>	N (None), O (Odd), E (Even)
<data bits>	5, 6, 7, 8
<stop bits>	1, 1.5, 2
<hand shake>	H (Hardware CTS), S (Software Xon/Xoff), N (None)
<end line>	R (Return), L (Line Feed)  up to four total. For example, RLRL

The default settings are 9600 baud rate, no parity, 8 data bits, 1 stop bit, hardware hand shake and a return and line feed for the end line.
The following command restores the default settings for the COM1 modem port:

SET PRINTER TO COM1, 9600, N, 8, 1, H, RL

In FoxPro for MS-DOS and FoxPro for Windows, use SET PRINTER TO without an argument to reset output to the default MS-DOS PRN print utility.
Printer output can be redirected to a network printer.  Once SET PRINTER is issued for a network printer, output prints or collects in a print spooler until a new SET PRINTER command is issued.  Consult your network documentation for additional information about printing on your network.

\\<machine name>\<printername> = <dest>

The first format of the network SET PRINTER command spools printer output to a network printer.  <machine name> is the network name assigned to your workstation.  This name is assigned by the network administrator and must be unique.  <printer name> is a name assigned to the printer and is also assigned by the network administrator. LPT1, LPT2 or LPT3 is used to identify the destination (<dest>) of the installed printer.
The second format of the network SET PRINTER command is specifically designed for printing under Novell Advanced Netware version 2.00 or later.  

\\SPOOLER

Although SPOOLER must be included for compatibility, it is ignored.  Any character string can be substituted.  When using the options below, don't include any space between the clauses.

\N

Include this clause to suppress printing a banner page (No Banner).

\F = <expN> 

This clause specifies the form number <expN> (0 through 255) that the output is printed on.  This option is useful for producing different types of printed output, such as checks, invoices, letters, and so on. 

\B = <banner>

This clause specifies the heading that is printed on the banner page.  <banner> can contain up to 12 characters.  The default heading is your network user name.

\C = <expN>

This clause specifies the number of copies (1 through 255) queued to a network printer.  The default is 1.

\P = <expN>

This clause specifies the network printer where output is sent.  <expN> is a number assigned to the printer by the network.  The default is 0.

\S = <server>

This clause specifies the network server to which the printer is attached.  <server> shouldn't be a character string (that is, it shouldn't be surrounded by quotation marks).

\Q = <queue>

This clause specifies the queue name assigned to the printer you send output to.  <queue> shouldn't be a character string (that is, it shouldn't be surrounded by quotation marks).
>I've been asked to relay a question about a FoxPro DOS app that prints to a recipet printer using SET PRINTER and ??.
>
>When printing, it delays the output of the printer by several minutes on NT/2000/XP but not on 9x/ME. I think they said it has somethign to do with the Spooler holding on to it but I don't remeber for sure.
>
>Anyone know how to work around this?
>
>Thanks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform