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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dot Matrix Printer form feeds a full page after code prints one label on the printer.

Status
Not open for further replies.

GordonSH

Technical User
Mar 30, 2021
28
US
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

Printer1_fgc6nn.jpg
PrintingPreferencesLayout_ulkwu1.jpg


I have created 4x1 label in the printer properties.
Please help.
Thank you in advance,
Gordon
 
If I have selected the 4x1 Label, why does the printing Preferences show a letter image?
 
Well,
NOW the printer is not FF whole page but gives attached error.
Detail_Band1_gwsuip.jpg

Please help.
Thank you in advance,
Gordon
 
Gordon,

when you modify the report/label either from the project manager or with
Code:
modify label mylabel

click 'report' in the menu and look at 'properties'... what's the page layout set to?

and click the 'page setup' button.. what paper size do you have?

n
 
Page_Layout_zgb8hk.jpg
Page_Setup_xokrax.jpg


Here's the page layout and page setup

Thank you Nigel
 
Something wrong with the bands that it doesn't print the first line.
 
Gordon,

in the report designer... what does the first line look like?

do you have a 'print when' with 'remove line if blank' ticked?


n
 
Hi Nigel,
The first line should not be blank because it's the line with the name on it.
ALLT(label.title)+IIF (empty(label.title),""," ") +ALLT(label.firstname)+" "+ALLT(label.lastname)
Field_Properties_ak4p3u.jpg
 
Gordon,

well... that looks ok from here. put a browse in front of the 'report form label-1.frx' and check what the data looks like.

(or open that line in the debugger)

n
 
Hi Nigel,
I think I have solved the problem.
Somehow the printer won't let me print on the top of the label.
So I have combined the Country line with the line above it and moved the remaining lines down.
This allows all lines to print on the label.
ReportDesigner-Label-1.frx_vxwcyv.jpg
 
That's not the last problem.
It works on my computer but not on my clients computer. Ugh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top