Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any Work around for Set Printer to Name command
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00932252
Message ID:
00932995
Views:
19
>>If I read this correctly, the failure is in the Receipt PRG. Or is the problem in the Kick PRG since you are calling it before Receipt? I am still a little confused as to where the error is originally occuring. Is there a particular line of code in the Receipt or Kick PRGs where the error occurs? If so, can you post that code and point out exactly which line of code fails or where code execution stops? Also, do you get an error message? If so, what is it?>>

Hi Mark,

The Line of Code that fails is "Set print to Name ".
Below is my code to open the cash drawer.
Set device to print
Set print to name "STAR"  ==> Line of Code Fails
@prow()  ,00 Say Chr(27)+"@"     &&  Initialize printer
@prow()  ,pcol() Say Chr(28)  && Drawer Kick
@prow()  ,pcol() Say Chr(7)   && Drawer Kick
@prow()  ,pcol() Say Chr(7)   && Drawer Kick
Set print to
Set Device to Screen
Messagebox("Please Close Cash Drawer!",0+64,"Drawer is Open")
Since, it doesn't print to the printer STAR that connected to LPT1, it cannot open the Cash Drawer, instead it prints to the network printer. I'd set the Star to "Print directly to port", this is the same case of the receipt.prg...

Hope you can get it..

Thanks.
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform