<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal> Environment: Filepro 5.8.03.30D6 running on Linux 3.10.0-693.17.1.el7.x86_64<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Is there any “getenv” variable I can grab from inside a processing table to tell which printer I am on, or what PFPRTC (pf printer codes table) is active when a report is run? For example, if a laser printer named laser23 is active and define printers shows a print code table of hp-4050 assigned to it, a MSGBOX line like:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>THEN: msgbox “PFPRTC=” {getenv(“PFPRTC”)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Displays:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> PFPRTC= (blank) <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> I’ve tried testing for getenv(“PFPRINTER”), but PFPRINTER is blank, too.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>THE FULL PROBLEM (in case you have a better idea for solving the issue…): <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> I’m trying to make changes to some filePro forms that currently print correctly *<b>ONLY</b>* on a dot-matrix printer so that they will print correctly on *<b>EITHER</b>* a dot-matrix *<b>OR</b>* a laser printer.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> I’m trying to avoid creating duplicate forms, one for a laser printer and one for a dot-matrix printer. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> There are a lot of forms that get called from inside invoice processing and in cron batch scripts, so I’m trying to avoid setting my own environmental variables, like setting YOURPRINT=DOT; export YOURPRINT or YOURPRINT=LASER; export YOURPRINT.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> The reason these forms will only print correctly on a dot-matrix printer is that, in addition to the print codes on the forms, they have strings of embedded print codes in the processing tables, like this:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> IF: ‘Epson Esc/Elongated On/Off<o:p></o:p></p><p class=MsoNormal>THEN: es=chr("27")';bl=es&"E";nb=es&"F" <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> Strings BL and NB are embedded in the invoice lines and then a “print” command is issued.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Looking at the hp-4050 laser printer table (remembering Jim Asman) I see that ESC-E causes the laser printer to do a “Printer Reset”. The printer reset causes the forms to print one line on each page, so if an invoice form has 10 detail lines on it, 10 pages spit out of the laser printer with one line printed on each page. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Of course there is some urgency in this because of the Corona virus. Sales people working from their homes would like to print invoices and other forms using their home laser printers. I couldn’t talk the company into buying dot-matrix printers for each of their employees to use at home… <grin><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Mike Schwartz<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>