Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Problems with a print function
Hi, I have some problems with a procedure used to print some data.
I have two different printers: OKI 591 and OKI 391.
The procedure prints two times some data.
I have two different effects on printers:
OKI ML 591 stops printing for about 10 seconds at the beginning of the
second print and then continue printing.
OKI ML 391 stops at the same point and does not continue printing.
I think the problem could be the printer buffer but I'm not sure of it.
Anyone can solve this problem?
Thanks
VP


P.S. I post my code:


procedure STA_POLI

set printer on
set console off
set device to printer
set margin to
@ PRow(),  2 say prn_init
@ PRow(), 82 say LTrim(Str(Day(d_emiss), 3, 0))
@ PRow(), PCol() + 1 say meseit(d_emiss)
*   @ PRow(), PCol() + 1 say LTrim(Str(Year(d_emiss), 4, 0))
@ PRow(), PCol() + 1 say "20" + SubStr(LTrim(Str(Year(d_emiss))), 3, 2)
*   @ 5 , 5 say SubStr(LTrim(Str(Year(d_emiss))), 3, 2)
@ PRow(), PCol() + 10 say larg1 + pegno + larg0
@ PRow() + 2, 54 say larg1 + pegno + larg0
@ PRow() + 3,  0 say gr_pr picture "999.99"
@ PRow(),  6 say stima picture "@E 99999.99"
@ PRow(), 19 say durata
@ PRow(), 24 say LTrim(Str(Day(d_scad), 3, 0))
@ PRow(), PCol() + 1 say meseit(d_scad)
*   @ PRow(), PCol() + 1 say LTrim(Str(Year(d_scad), 4, 0))
@ PRow(), PCol() + 1 say "20" + SubStr(LTrim(Str(Year(d_scad))), 3, 2)
@ PRow(), 46 say converti(prestito) + "**"
@ PRow(), 81 say prestito picture "@E 99999.99"
@ PRow(), PCol() say larg1
@ PRow(), 97 say prestito picture "99999.99"
@ PRow(), PCol() say larg0
@ PRow() + 3,  1 say dir_pr picture "@E 99999.99"
@ PRow(),  12 say netto_pr picture "@E 99999.99"
@ PRow(), 22 say Time()
@ PRow(), 42 say rcv
@ PRow(), 97 say SubStr(cogn_nome, 1, 18)
@ PRow() + 3,  2 say cogn_nome
@ PRow(), 34 say coniuge
@ PRow(), 53 say telefono
@ PRow(), 72 say cod_fisc
@ PRow(), 104 say pezzi picture "999"
@ PRow() + 3,  2 say via
@ PRow(), 35 say cap
@ PRow(), 51 say citta
@ PRow(), 73 say prov
@ PRow(), 77 say atto_doc
@ PRow(), 103 say gr_pr picture "999.99"
@ PRow() + 3,  2 say luogo_n
@ PRow(), 18 say prov_n
@ PRow(), 22 say data_n
@ PRow(), 32 say documento
@ PRow(), 49 say data_doc
@ PRow(), 58 say left(ril_doc,3)
@ PRow(), 62 say sca_doc
@ PRow(), 72 say left(com_doc,15)
@ PRow() + 4,  1 say descr1
@ PRow() + 1,  1 say descr2
@ PRow() + 1,  1 say descr3
@ PRow() + 1,  1 say descr4
@ PRow() + 1,  1 say descr5
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow(),  2 say prn_init
@ PRow(), 82 say LTrim(Str(Day(d_emiss), 3, 0))
@ PRow(), PCol() + 1 say meseit(d_emiss)
*   @ PRow(), PCol() + 1 say LTrim(Str(Year(d_emiss), 4, 0))
@ PRow(), PCol() + 1 say "20" + SubStr(LTrim(Str(Year(d_emiss))), 3, 2)
@ PRow(), PCol() + 10 say larg1 + pegno + larg0
@ PRow() + 2, 54 say larg1 + pegno + larg0
@ PRow() + 3,  0 say gr_pr picture "999.99"
@ PRow(),  6 say stima picture "@E 99999.99"
@ PRow(), 19 say durata
@ PRow(), 24 say LTrim(Str(Day(d_scad), 3, 0))
@ PRow(), PCol() + 1 say meseit(d_scad)
*   @ PRow(), PCol() + 1 say LTrim(Str(Year(d_scad), 4, 0))
@ PRow(), PCol() + 1 say "20" + SubStr(LTrim(Str(Year(d_scad))), 3, 2)
@ PRow(), 46 say converti(prestito) + "**"
@ PRow(), 81 say prestito picture "@E 99999.99"
@ PRow(), PCol() say larg1
@ PRow(), 97 say prestito picture "999999.99"
@ PRow(), PCol() say larg0
@ PRow() + 3,  1 say dir_pr picture "@E 99999.99"
@ PRow(),  12 say netto_pr picture "@E 99999.99"
@ PRow(), 22 say Time()
@ PRow(), 42 say rcv
@ PRow(), 97 say SubStr(cogn_nome, 1, 18)
@ PRow() + 3,  2 say cogn_nome
@ PRow(), 34 say coniuge
@ PRow(), 53 say telefono
@ PRow(), 72 say cod_fisc
@ PRow(), 104 say pezzi picture "999"
@ PRow() + 3,  2 say via
@ PRow(), 35 say cap
@ PRow(), 51 say citta
@ PRow(), 73 say prov
@ PRow(), 77 say atto_doc
@ PRow(), 103 say gr_pr picture "999.99"
@ PRow() + 3,  2 say luogo_n
@ PRow(), 18 say prov_n
@ PRow(), 22 say data_n
@ PRow(), 32 say documento
@ PRow(), 49 say data_doc
@ PRow(), 58 say left(ril_doc,3)
@ PRow(), 62 say sca_doc
@ PRow(), 72 say left(com_doc,15)
@ PRow() + 4,  1 say descr1
@ PRow() + 1,  1 say descr2
@ PRow() + 1,  1 say descr3
@ PRow() + 1,  1 say descr4
@ PRow() + 1,  1 say descr5
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1 say " "
@ PRow() + 1,  1
set margin to
set printer off
set device to screen
set console on
return



Report this thread to moderator Post Follow-up to this message
Old Post
Vincenzo Palomba
11-21-04 01:55 PM


Re: Problems with a print function
Vincenzo,

> I have two different effects on printers:
> OKI ML 591 stops printing for about 10 seconds at the beginning of the
> second print and then continue printing.
> OKI ML 391 stops at the same point and does not continue printing.

try to add a SET PRINTER TO, without parameters, at the end of the print
job.

Ciao,
Davide.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.guolo.com/printfil
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------



Report this thread to moderator Post Follow-up to this message
Old Post
Davide Guolo
11-21-04 01:55 PM


Re: Problems with a print function
Davide,

>try to add a SET PRINTER TO, without parameters, at the end of the print
>job.

That will tell Clipper to close the print job. But which print job?
Which spooler? Unless SET PRINTER TO LPT1 (or LPT2 or LPT3) is added
at the beginning Clipper won't know. So ...

SET PRINTER TO LPT1
// all the other stuff
SET PRINTER TO

... will take care of it.

Klas

-------
klas dot engwall at engwall dot com

Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]

Report this thread to moderator Post Follow-up to this message
Old Post
Klas Engwall
11-22-04 01:55 AM


Re: Problems with a print function
Vincenzo,

> I have two different effects on printers:
> OKI ML 591 stops printing for about 10 seconds at the beginning of the
> second print and then continue printing.
> OKI ML 391 stops at the same point and does not continue printing.

try to add a SET PRINTER TO, without parameters, at the end of the print
job.

Ciao,
Davide.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.guolo.com/printfil
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------



Report this thread to moderator Post Follow-up to this message
Old Post
Davide Guolo
11-23-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Clipper archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:19 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.