Ok.....I finally figured out how to do this.  For those of you who need
to use printer control codes from within Rbase for Windows, here is what
I found that works.

1) You have to have a "Generic/Text only" printer set up as your windows
printer.....anything else eats the printer control codes.

2) Use Courier 10 (not the TT Courier 10, the plain Courier 10) as your
font.

3) Create the variables in the report using the CHAR function, but put
parentheses around the whole thing.....ie
 vRESET = ( (CHAR(27)) + (Char(67))  )           .....notice the extra
()

4) Areas such as the REPORT FOOTER have to be at least some certain
size, about 1/4 inch or the variables/printer control codes you put in
there won't get used.

5) The act of putting a printer control code inside the Report footer
seems
to add another line of length to the report. To get rid of it I had to
use a reverse linefeed....sometimes several to roll the paper backwards
to compensate for the extra lines.

6) If you need to have the paper start with the perforations at the top
edge of the paper cutter, you have to use a bunch of reverse line feeds
at the top of the report to bring the paper down so you can start typing
on the top edge of the paper.  You have to have a printer that won't jam
the paper if the top edge gets rolled down below the cutting edge, or
you have waste a piece of paper by leaving a blank sheet at the end of
every print job, and then leave the blank sheet attached to the printer
when you tear off your report.

7) If you need to have the paper end up with the perforations at the
cutting edge, then you have to set the report settings to let the report
do it's own Form Feed BEFORE the Report Footer, and then use at least 1
reverse line feed to bring the perforations back down by 1-2 lines. 
This took 8 hours of trial and mostly error to get this to work.  If you
find a better way, let me know!

8) If you are on a Novel LAN (4.11) and are sending this to a remote
printer, you are gonna go bald if you don't do the following.....
Print the report to a file, and then copy the file to LPT1 (as opposed
to printing the file directly to the printer).  If you need to do a
capture command, don't do it directly....use a batch file....ie
zip c:\command.com /c c:\file.bat
where file.bat contains....
capture L=1 Q=myque NT NB NFF TI=3  or whatever you need
ALSO!!!!! You have to set WHILEOPT OFF, and stick a PAUSE FOR 1 after
each of the zip c:\command.com /c c:\file.bat  lines or else Rbase hangs
up!!!

I hope this helps somebody.  ANY comments would be MOST appreciated!!!!!


Mike Sinclair

Reply via email to