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

pict '!XXXX' &&prints first record

pict '!XXXX' &&prints second record

&&prints first record

&&prints second record

&&prints first record

&&prints second record

&&prints first record

&&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)



 
 
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

pict '!XXXX' &&prints first record

pict '!XXXX' &&prints second record

&&prints first record

&&prints second record

&&prints first record

&&prints second record

&&prints first record

&&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)



 
 
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



 
 
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.