Code:
*Command14.click - Print a Single Label for current record.
PUBLIC Defaultpr, Printerb
Local Id_Save
SELECT 1
use medspot
Store medspot.id to Id_Save
sele 5
use owner
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
use label
sele label
appe blan
repl id with medspot.id
repl lastname with medspot.lastname
STORE lastname TO Mlast
repl firstname with medspot.firstname
STORE firstname TO Mfirst
repl address1 with medspot.address1
repl company with medspot.company
repl city with medspot.city
repl state with medspot.state
repl zipcode with medspot.zipcode
repl title with medspot.title
repl country with medspot.country
SET PRINTER TO &Printerb
SET PRINTER FONT 'Swiss', 12
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 medspot
Set Order to WIZARD_1
Thisform.Grid1.refresh
ThisForm.Refresh
I have created 4x1 label in the printer properties.
Please help.
Thank you in advance,
Gordon