Re: How to print graphics with SQL*ReportWriter.
Date: 10 Jan 1994 14:25:02 -0800
Message-ID: <2gskju$cnm_at_crl.crl.com>
Dennis Moore (dbmoore_at_us.oracle.com) wrote:
:*In article <9401050947.AA18267_at_jc-adga.crad.dnd.ca> adga_at_hq.crad.dnd.ca (JC Lachapelle) writes:
:*>Hi!
:*>
:*>Could someone give me any hints or examples on creating user-defined printer
:*>codes in the printer definition file for SQL*ReportWriter 1.1.
:*>
:*>I want to print graphics in my reports!
:*>
:*>Right now, what I do is :
:*>-generate the report in a file (postscript format using pslan132 from the
:*>printer definition);
:*>-then, I concatenate the file with a little postscript program I wrote which
:*>draws lines on the page;
:*>-then, I send the file to the printer, et voila;
:*>
:*>But I could do all this at once if the manual would explain a little better.
:*>
:*>Pre-Thanx
:*Even better is to upgrade to Reports 2.0 if available on your platform ...
:*BTW, Support should be able to provide you with workarounds for some graphics
:*problems, particularly the box problem, with 1.1. Give 'em a call ...
:*-- Dennis Moore, my own opinions, etcetcetc
There is a way to draw lines and boxes, I have three different ways and all three range from difficult to extremely difficult. I am putting together a report that uses extensive lines and boxes, trying to replicate a federal form, and the way I found the easiest was to create a view using the ASCII codes that represent the various lines and graphics that would be used in a box. Before you begin with this is working on an HP Laaserjet II printer and the symbol set is PC-8, I have not tried it on any other printers. A small portion of the view is:
create view lines (top_left_corner, top_right_corner, bottom_left_corner, bottom_right_corner, h_line_1, # horizontal line 1 character long h_line_5, # horizontal line 5 characters long v_line) # vertical line as select chr(218), # ASCII for top left corner chr(191), # ASCII for top right corner chr(192), # ASCII for bottom right corner chr(217), # ASCII for bottom right corner chr(196), # horizontal line chr(196), chr(196), chr(196), chr(196), chr(196), # 5 hor lines chr(179) # vertical line from dual;
You get the idea?
After the view has been created, then in a Query Settings create a query
and call the fields in the view: LINES
select top_left_corner, tlc # aliasing the name makes it # easier in the text settings top_right_corner trc, h_line_1 hl, h_line_5 hl5, v_line vl, etc.... from lines
then in the Text Settings for the query, put the field names as you would any other field:
&TLC&HL5&TRC This will print a line with corners on the top left and right.
The last two things I had to do was:
- Change one line in the printdef.dat
:is\E&16.1 # This is the # of 1/48" Increments for the # Vertical Motion Index. (Whatever Vertical # Motion Index is?????) 2. On the HP Laserjet II select the PC-8 fonts set.
I am putting together a more detailed report, email me if you want a copy. Should be done in a week or two.
Robert J. McCallister Received on Mon Jan 10 1994 - 23:25:02 CET