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

Setting fonts in reports to a dot matrix printer in Vfp3.0 & Higher

Status
Not open for further replies.

barno

Programmer
May 27, 2002
10
How do i set fonts to my reports programatically(using code) NOT report generator to a Dot Matrix Printer in Visual Foxpro? When i try the "Chr" function windows interprets it to a different output.
 
barno

Escape codes for printers are normally supplied by the printer manufacturer, and can vary from printer to printer. Check the manual that came with your printer. If you do not have that, the printer manufacturer might have a website that lists those escape codes.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi, Barno

Are you using @prow() and Say ?
If u are, i guess you are trying, to print a report with escape codes. Visual foxpro doesn't support that, that report with escape codes is obsolete.

However if you try to print that escape codes with the report in A FILE, then you print that file form within MS-DOS prompt, u can print that report.

1. Print that report and that codes with in a file, u could use SET PRINTER TO, and SET DEVICE TO.
2. after printing use this command
nmfile = <the name file>
RUN TYPE &nmfile > PRN

this method work fine with me when i'm printing a form that need escape code in dot matrix printer. this method never tested in XP (which we know that this system doesn't support MS DOS much).

Hope this will help.
 
Barno,

If you are using @ SAY or ? commands, and you are using the correct Windows printer driver for your printer, you should be able to add the FONT clauses to the command:

@ 2,1 say &quot;Hello&quot; FONT &quot;Arial&quot; STYLE &quot;B&quot;

However, that won't work if you are using the Generic/Text Only driver. In that case, you will have to figure out the escape sequences as Mike Gagnon and Kampret suggested. It's much easier to use the printer-specific driver.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top