Easy way to determine the print code table type in a processing tables?

Michael Schwartz (PC Support & Services) filepromike at gmail.com
Thu Mar 26 08:45:59 PDT 2020


     Environment:  Filepro 5.8.03.30D6 running on Linux
3.10.0-693.17.1.el7.x86_64

 

     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:

 

THEN:  msgbox "PFPRTC=" {getenv("PFPRTC")

 

    Displays:

 

PFPRTC=               (blank) 

 

     I've tried testing for getenv("PFPRINTER"), but PFPRINTER is blank,
too.

 

THE FULL PROBLEM (in case you have a better idea for solving the issue.):  

 

     I'm trying to make changes to some filePro forms that currently print
correctly *ONLY* on a dot-matrix printer so that they will print correctly
on *EITHER* a dot-matrix *OR* a laser printer.

 

     I'm trying to avoid creating duplicate forms, one for a laser printer
and one for a dot-matrix printer. 

 

      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.

 

     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:

 

      IF: 'Epson Esc/Elongated On/Off

THEN:  es=chr("27")';bl=es&"E";nb=es&"F"  

     

    Strings BL and NB are embedded in the invoice  lines and then a "print"
command is issued.

 

     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. 

 

     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>

 

Thanks!

 

Mike Schwartz

 

      

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20200326/5e24ec67/attachment.html>


More information about the Filepro-list mailing list