Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting printer error attempting to print from FoxPro

Status
Not open for further replies.

GordonSH

Technical User
Mar 30, 2021
28
0
0
US
Printer_Error_tgiz82.jpg

Printer is configured for LPT Port 2
It goes immediately to error in the print que. It looks fine in the Print preview mode.
Report_Designer_c1ifin.jpg

THE CODE FOR PRINTING THE LABLE IS BELOW:*Command14.click - Print a Single Label for current record.
PUBLIC Defaultpr, Printerb
Local Id_Save
SELECT 1
select medspot
Store medspot.id to Id_Save
*MESSAGEBOX (Id_Save, 0, "Customer Id")
sele 5
*use owner SHARED
SELECT Owner
STORE owner.dprinter TO Defaultpr
*MESSAGEBOX (" DEFAULT PRINTER IS: &Defaultpr", 0, "Default Printer Status")
STORE owner.lprinter TO Printerb
*MESSAGEBOX (" LABEL PRINTER IS: &Printerb", 0, "Label Printer Status")
sele 3
sele label
appe blan
repl label.id with medspot.id
repl label.lastname with medspot.lastname
STORE label.lastname TO Mlast
repl label.firstname with medspot.firstname
STORE label.firstname TO Mfirst
repl label.address1 with medspot.address1
repl label.company with medspot.company
repl label.city with medspot.city
repl label.state with medspot.state
repl label.zipcode with medspot.zipcode
repl label.title with medspot.title
repl label.country with medspot.country
*MESSAGEBOX ("Label for: "+trim(Mfirst)+" "+trim(Mlast), 0, "First & Last")
SET PRINTER TO &Printerb
SET PRINTER FONT 'Swiss', 10
REPORT FORM label-1.frx preview
REPORT FORM Label-1.frx NOEJECT NOCONS TO PRINTER
MESSAGEBOX ("Label for: "+trim(Mfirst)+" "+trim(Mlast)+" PRINTED ON &Printerb", 0, "Label Status")
SET PRINTER TO &Defaultpr
USE label excl
set safe off
zap
set safe on
*USE label share
SELECT 1
Select medspot
Set Order to WIZARD_1
Thisform.Grid1.refresh
ThisForm.Refresh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top