Re: Printing from Oracle Forms (4.0)

From: Robert DuMoulin <rdumouli_at_lanier.com>
Date: Tue, 8 Nov 1994 18:08:50 GMT
Message-ID: <Cyynqr.L11_at_lanier.com>


Maurice Walshe (mjwalshe_at_tymnet.bt.co.uk) wrote:
: In article <39bbr2$6eg_at_news.bu.edu>, ggeorge_at_bu.edu (Gerry George) says:
 

: >I have to "program" in Forms4.0 to allow our Windows & Sun UNIX clients
: >to print to networked printers. We have printers available via both LPD
: >on the Unix side and Windows/Netware print queues on the PC/Windows side.
: >The database server is an HP Unix box (which has printer access via lpd).
: >Connection is via TCP/IP.
: >I do not know Forms40, but my boss suggested that it should be straight-
: >forward since I do know "regular" programming languages (C, etc) and Windows
: >internals.
: >My question: Is a printed output send by the client (Windows/Sun) or from
: >the server (HP) or can it be both?
: >How would it be done to get proper formatting, etc of output and (if possible)
: >fonts other than basic courier (Two of the printers are Postscript compatible).
: >Is this hopeless without knowing how to program in Forms?
 

: its hopeless in forms4 any how :-) you have to use oracle reports to do any printing.
 

: And knowing regular programing and windows internals wont help much.
 

: We did try to do a quick and dirty print screen function but this only prints
: the curent window - not the entire MDI its also very slow 20 min for a tiny
: form and produces huge! print files (this bug is known to Oracle)
 

: Rgds Maurice

You do not have to use reports to do all printing (at least not in Forms 3). I developed a SQL*Menu5/SQL*Forms3 program which called PRO*C user exit to create a customized PostScript, HPLJ III & IV Forms. First create a PRO*C function with arguments which identify your report data. This function calls other PRO*C functions to query and build your report to a temp file in whatever format you choose to create (HPGL, PostScript ...) assuming you can program for these devices (Yes, knowing regular programming does help). Perform a system call to ROUTE the file to your printer, then delete the temp file upon confirmation. Recompile SQL*FORMS for the user exit (look in manual on how to do this) and call the user_exit from a whatever trigger you set up to print.

To program for several printers, get manuals for each printer showing the escape sequences to do the basic cursor movements, line drawings, font selection and graphics. In C you can create a #define file with these sequences in it and design the program to allow you to substitute the correct sequence into output strings based on the printer selected. If you have a standard set of output forms to print to, create template files for each printer/form combination and copy the template to your output file before you add your data. This is especially easy in PostScript, so if you have it, use it.

Don't be fooled by the limits of 4GL programming. Find ways around them. Received on Tue Nov 08 1994 - 19:08:50 CET

Original text of this message