Set device to print
>Set print to name "STAR" ==> Line of Code Fails
>/
Then we need to concentrate on this line of code. What is the error message? My guess is the printer name "STAR" does not exist. What you should do is make your code generic. Maybe a configuration option where the user can select and save the printer to use for printing the receipts. Then you store that selection in a table that identifies that user and that workstation as using that printer for the receipt printer.
Use the GETPRINTER() function to get the printer name. If the user clicks the Cancel button on the printer selection dialogue, the return value will be empty. If a printer had not previously been selected, you could keep prompting them until they select a printer.
You can use SYS(0) to get the machine name and user login ID. Then store the printer name selected, the machine name and login ID in a configuration table. Now you are not hard-coding a printer name in your code. Some users might install this printer using a slightly different name, like "Star Printer" or "Star".Mark McCasland
Midlothian, TX USA