Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Landscape printing

Re: Landscape printing

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1997/01/31
Message-ID: <32F1E8F9.610B@mf.sigov.mail.si>#1/1

Gus Spier wrote:
> =
 

> Hi, gang!
> =
 

> Here's the situation.
> =
 

> - For political reasons, I'm not allowed to furnish the client wi=
 th
> an Oracle Report.
> =
 

> - Notwithstanding, the client's Requirement still exists. SQL*Pl=
 us
> retrieves the data in the appropriate format. Now I need to send the
> resulting *.lst file to the HP4m laser printer. Normally, I'd simply d=
 o
> !lpr file_name.lst ... but I need the printer to output the report in
> LANDSCAPE paper orientation (11 by 8.5). Will SQL*Plus do this? Is th=
 er
> a SET command I can modify to send the correct code to the printer?
> =
 

> - Parameters
> DEC Alfa 2 400, OSF1
> Oracle 7.1.6.x.x.x
> Hewlett-Packard Laserprinter 4 m
> =
 

> I'd appreciate e-mail response. I'll sum up the answers and post here.=
 

> =
 

> TIA.
> =
 

> Gus

Ther is not such SET command in the SQL*Plus. However, you can tel your

printer dynamicaly what you want in his PCL language, i.e. escape sequences.

You simply insert appropriate escape sequence in the begining of your

spool file, and at the end of the spool file you add "reset" escape

sequence. I think the appropriate command for landscape orientation on your

printer is "Esc&l1O" (027 038 108 049 079 in decimal) and reset is "EscE" (027

069). You will also have to set your SQL*Plus escape variable to handle

"&" in the escape code properly. You can use this technique also for

other things like font selection, bold, italic, ...

Example:

SET ESCAPE '\' SET ESCAPE ON DEFINE landscape =3D =8B&l1O

DEFINE reset =3D =8BE =

SPOOL my_file.lst

SELECT '&reset' || '&landscape' FROM dual;

SELECT <data stuff> FROM <tables> .......

SELECT '&reset' FROM dual;

SPOOL OFF

--

Regards,  Jure

 =

 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 ! Jurij Modic                            Republic of Slovenia !
 !  tel: +386 61 178 55 14                Ministry of Finance  !
 !  fax: +386 61  21 45 84                Zupanciceva 3        !
 !  e-mail: jurij.modic_at_mf.sigov.mail.si  Ljubljana 1000       !
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Received on Fri Jan 31 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US