Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dot Matrix Printers and FRX font substitutions
Message
From
26/06/2003 17:31:35
 
 
To
26/06/2003 16:23:59
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00804424
Message ID:
00804474
Views:
28
Hi Tracy,

The only solution I've found to this is to bypass Windows and send the reports to the printer directly. You can still use the VFP report designer to create FRX reports, but don't use REPORT FORM to send them to to the printer. Instead, use REPORT FORM < reportname > TO FILE < filename > ASCII to create a text file, then call a low-level file routine to read the file and send it line by line to the printer using VFP's ??? command. Sample code is below.
lnHandle=FOPEN(tcFileName)
DO WHILE !FEOF(lnHandle)
   lcPrintLine = FGETS(lnHandle)
   ??? lcPrintLine + CHR(13) + CHR(10)
ENDDO
=FCLOSE(lnHandle)
On the workstations, set up a Generic/Text-Only printer rather than using a specific printer like Oki ML320 or whatever. Generic/Text-Only seems to consistently give the best results. In my experience, configuring a specific printer, even if it's the right one, sometimes results in double-space reports and other unwanted anomalies. As for report layout, using Courier New 12pt in the VFP report designer seems to be the best approximation of the 10-cpi by 6-lpi standard for dot matrix printers, although you have to be sure to leave enough space between fields or you may get two lines of print where you wanted only one.

HTH,

-Rick


>Is there anyway that anyone knows of to prevent a dot matrix printer (Okidata models to be exact) from switching to NLQ print mode when printing reports creating using the visual foxpro report designer? The printer specific information is stripped from the report of course before compiling the app. What we have run into is that some of our customers still print to Okidata Microline 320 and Okidata ML 320 Turbo printers and we are converting most of our reports from dos reports (@...say and ??) to frxes. No matter what font I use in the report (courier new, courier, times new roman, arial, etc) the printer always switches from draft mode to nlq. This of course I'm assuming is due to font substitution being done by the printer. I do not want to create separate reports for each and every printer out there to store printer information and printer specific fonts in the frx....and some of our customers prefer the 'draft' mode to save ribbon and especially print time!
>
>Using dos printing, I would send escape sequences to the printers to tell it draft or high speed draft printing and the font and pitch, etc. However, we are trying to switch to all frx reports and no more dos reports and control codes, etc due to the many different types of printers out there now and so many gdi printers also that don't accept escape codes...
>
>Any ideas appreciated!
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Reply
Map
View

Click here to load this message in the networking platform