Labels with Dot Matrix Printer in VFP9  
Author Message
JLB4536





PostPosted: Visual FoxPro General, Labels with Dot Matrix Printer in VFP9 Top

I cannot get a Panasonic 1150 dot matrix to print a 2" long label in VFP90.

I have created a new form size in server properties and have saved the printer settings in the label form. Nothing works. We even created a new driver to default to the 2'' x 4'' form size.

It prints the label just fine, but ejects to an 11'' paper size.

I even set the reportbehavior to 80...still nothing.

Any suggestions




Visual FoxPro2  
 
 
Lakshminarayana





PostPosted: Visual FoxPro General, Labels with Dot Matrix Printer in VFP9 Top

I also had the same problem. what ever settings u do the page ejection is not proper in most of the dot matrix printers. so i always use program which writes to a ascii text file. here is the code to write labels to a ascii text file.

customer.dbf has custid,custname,add1,add2,add3,pin and has 1000 records

my program will be (this program will print 16 labels 2 across in one page)

nrou = 0 &&relative row position variable

pctr = 0 &&counter to keep track of how many addresses printed on one page

set device to file dlrlbl.txt &&the output will be directed to a ascii text file

sele a

use customer

go top

do while !eof()

scat memv &&the first records values will be assigned to memory variables like m.custid,m.custname etc

if !eof()

skip &&skips to the next record to print second record

endif

@ nrou,000 say m.custid pict '!XXXX' &&prints first record

@ nrou,032 say custid pict '!XXXX' &&prints second record

@ nrou,000 say m.custname pict '!XXXX' &&prints first record

@ nrou,032 say custname pict '!XXXX' &&prints second record

@ nrou,000 say m.add1 pict '@!' &&prints first record

@ nrou,032 say add1 pict '@!' &&prints second record

@ nrou,000 say m.add2 pict '@!' &&prints first record

@ nrou,032 say add2 pict '@!' &&prints second record

@ nrou,000 say m.add3 pict '@!' &&prints first record

@ nrou,032 say add3 pict '@!' &&prints second record

@ nrou,000 say 'Zip - : ' + allt(m.pin) &&prints first record

@ nrou,032 say 'Zip - : ' + allt(pin) &&prints second record

nrou = nrou + 2 &&2 lines space betwen labels

pctr = pctr + 1 &&pctr is incrimented to find out how many lables printed on each page

if pctr = 8 &&if i print 16 lables (2 across) (I.e. 8 * 6 = 48 lines), then i eject

nrou = 0 &&this puts the eject char in the text file

nrou = nrou + 1

pctr = 0 &&the label tracker variable is reset to 0 for next page

endif

sele dealer

if !eof()

skip

endif

enddo

set devi to screen

modi comm dlrlbl.txt

note : the pctr variable can be changed to suit your paper settings.

thanks

(lakshminarayana r)

EMail@HideDomain.com



 
 
Lakshminarayana





PostPosted: Visual FoxPro General, Labels with Dot Matrix Printer in VFP9 Top

I also had the same problem. what ever settings u do the page ejection is not proper in most of the dot matrix printers. so i always use program which writes to a ascii text file. here is the code to write labels to a ascii text file.

customer.dbf has custid,custname,add1,add2,add3,pin and has 1000 records

my program will be (this program will print 16 labels 2 across in one page)

nrou = 0 &&relative row position variable

pctr = 0 &&counter to keep track of how many addresses printed on one page

set device to file dlrlbl.txt &&the output will be directed to a ascii text file

sele a

use customer

go top

do while !eof()

scat memv &&the first records values will be assigned to memory variables

&&like m.custid,m.custname etc

if !eof()

skip &&skips to the next record to print second record

endif

@ nrou,000 say m.custid pict '!XXXX' &&prints first record

@ nrou,032 say custid pict '!XXXX' &&prints second record

@ nrou,000 say m.custname pict '!XXXX' &&prints first record

@ nrou,032 say custname pict '!XXXX' &&prints second record

@ nrou,000 say m.add1 pict '@!' &&prints first record

@ nrou,032 say add1 pict '@!' &&prints second record

@ nrou,000 say m.add2 pict '@!' &&prints first record

@ nrou,032 say add2 pict '@!' &&prints second record

@ nrou,000 say m.add3 pict '@!' &&prints first record

@ nrou,032 say add3 pict '@!' &&prints second record

@ nrou,000 say 'Zip - : ' + allt(m.pin) &&prints first record

@ nrou,032 say 'Zip - : ' + allt(pin) &&prints second record

nrou = nrou + 2 &&2 lines space betwen labels

pctr = pctr + 1 &&pctr is incrimented to find out how many

&&lables printed on each page

if pctr = 8 &&if i print 16 lables (2 across)

&&(I.e. 8 * 6 = 48 lines), then i eject

nrou = 0 &&this puts the eject char in the text file

nrou = nrou + 1

pctr = 0 &&the label tracker variable is reset to 0 for next page

endif

sele dealer

if !eof()

skip

endif

enddo

set devi to screen

modi comm dlrlbl.txt

note : the pctr variable can be changed to suit your paper settings.

thanks

(lakshminarayana r)

EMail@HideDomain.com



 
 
JLB4536





PostPosted: Visual FoxPro General, Labels with Dot Matrix Printer in VFP9 Top

Too bad that we have to resort to those tactics. Thank you for replying. I feel better knowing others have the same problem. This was driving me crazy.

So, in your opinion, it is the printer driver

Thanks again.



 
 
Lakshminarayana





PostPosted: Visual FoxPro General, Labels with Dot Matrix Printer in VFP9 Top

I am also really amazed that the output from report writer does not go very well with dot matrix printers. VFP is mostly used to develop application software and most of the application software users use dot matrix printer. but with ink jet and laser jet vfp report writer is very good. for me even single line reports of one simple dbf without any relation to other table, even these kind of reports does not print with proper page ejection. it prints the page. then the first line of second page starts printing from bottom of first page itself. and it keeps going down. i changed the driver and set the page length as 8.5"/12" then it was fine. but if u print through some other machine with the same driver and same printer setting, it won't print. then i formateed the system freshly installed, then it worked. it is really strange. and the most important here is that documents from excel and word print perfectly alright. so only i stopped using report writer and started writing programs i.e. @ row,col say.



 
 
Dan Freeman





PostPosted: Visual FoxPro General, Labels with Dot Matrix Printer in VFP9 Top

I am also really amazed that the output from report writer does not go very well with dot matrix printers. VFP is mostly used to develop application software and most of the application software users use dot matrix printer.


Really I don't think I've even seen a dot matrix printer in 15 years, much less had to use one.

 
 
JLB4536





PostPosted: Visual FoxPro General, Labels with Dot Matrix Printer in VFP9 Top

One must do what the customer wants if one wants to get paid!

Any alternative ideas



 
 
Dan Freeman





PostPosted: Visual FoxPro General, Labels with Dot Matrix Printer in VFP9 Top

Use the GENERIC-TEXT ONLY printer driver.