Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I output the result directly to the printer? 2

Status
Not open for further replies.

maswien

Technical User
Sep 24, 2003
1,286
CA

I tried following code in SQL Plus, but the printer won't print:


SPOOL TEMP
CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES

BREAK ON dept SKIP page ON REPORT

SET PAGESIZE 21
SET NEWPAGE 0
SET LINESIZE 200

TTITLE CENTER 'A C M E W I D G E T' SKIP 2 -
LEFT 'EMPLOYEE REPORT' RIGHT 'PAGE:' -
FORMAT 999 SQL.PNO SKIP 2

BTITLE CENTER 'COMPANY CONFIDENTIAL'

SELECT dept, div, app
FROM application
where rownum < 3
ORDER BY department;

SPOOL OUT
 
This question came up several years ago. The answer that time around was that the "spool out" command was unsupported in the Windows environment. See thread186-283738.

Lots of things have changed since then, but your experience suggests that the "spool out" command is still unsupported. I'm assuming, of course, that you are running on some flavor of Windows. Is that right?
 

Yes, I'm running at windows XP professional. What I want is to print report that generate from a query, I want add page break to each department, when I sppol the results to a file and then print the file the page break doesn't work, so I can't separate each department to different pages.
 

I guess my question is:

if spool out is not supported, is there any workaround to pickup the page break in the output file and print the results to separate pages?
 
Maswien,

Sometimes, doesn't Oracle just annoy you nearly to insanity? It does me: I just concatenated an ASCII Form Feed (FF) character to my SQL*Plus title string. SQL*Plus even confirms the FF character in the TTITLE string when I "show all", yet when SQL*Plus generates a page break, it strips from TTITLE any ASCII characters < ASCII 32. What a bummer.

An alternative for you would be to edit your spooled file before printing, doing a global change on your page-break titles to include an ASCII <12>, which is a Form Feed character.

Sorry that I don't have better news for you.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 


Thanks Mufasa, regardless so many annoying thing, I still like Oracle, it belongs to the old world but still new for me. Your solution is workable, I like it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top