PCX in report Make a R&R report that contains .pcx graphics
Glenn Alcott has discovered an amazing trick which enables you to include
PCX files in R&R reports (only on HP LaserJet and compatibles), using a
utility which first converts the PCX files into HP PCL code then
downloads the PCL code to the printer as a macro.
First, you have to get this utility (PCX2PCL), which is available in the
HPPER forum (HP Peripherals), Library 4, under the name 2PCL.ZIP. It also
includes a program to download the PCL code as a printer macro. Use the
utility to convert your PCX files (the documentation states that it may
have trouble with color or gray-scale PCX files, but you can convert
these to monochrome with a program such as Graphics Workshop, available
on the GRAPHSUPPORT forum). I found that it was unable to convert most
color files. In addition, you should be aware that it will probably be
difficult to control the size of the file when printed. Subject to these
limitations, however, it is a great find.
After the conversion, download the PCL file as a macro, using the
downloading program supplied with PCX2PCL. When downloading, you assign
the macro a number, which you will need to remember. The real trick comes
when you get into R&R. You have to create a calculated field consisting
of the escape sequence to print the macro and place this field at the
spot on your report where you want the graphic to appear. Keep in mind
that R&R has no idea that this is a graphic and will happily overwrite it
with text if you don't leave enough blank space around it. The expression
for the calculated field would be as follows:
chr(27)+"&fs#y3x1S"
Be very careful to enter it exactly as given - correct case is essential.
The "#" in the expression should be replaced with the number which you
assigned to the macro when it was downloaded.
It's a good idea to test out the printing in any version of xBase before
going into R&R, just to see what the result will look like. You can do
this with three commands:
SET DEVICE TO PRINT
@ x,y SAY CHR(27)+"&fs#y3x1S" && replace # with macro ID number
EJECT
That's all there is to it, and it really works!
Glenn Alcott
CIS 76044,747