Home » SQL & PL/SQL » SQL & PL/SQL » Adding a Header over output table report
Adding a Header over output table report [message #6736] Sat, 03 May 2003 03:42 Go to next message
Rudy
Messages: 12
Registered: March 2002
Junior Member
I have created 2 tables, join them and created a output report.
How can I add a Header centered above the output report. Header needed "Salary Report".

Any help is appreciated. Thank you.

Rudy
Re: Adding a Header over output table report [message #6737 is a reply to message #6736] Sat, 03 May 2003 04:05 Go to previous messageGo to next message
Naveen
Messages: 75
Registered: June 2001
Member
Hi,
Hope this helps.

SQL> REPHEADER PAGE CENTER 'Salary Report'

Regards--Naveen.
Re: Adding a Header over output table report [message #6738 is a reply to message #6736] Sat, 03 May 2003 04:07 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9077
Registered: November 2002
Location: California, USA
Senior Member
Add the line below immediately above your select statement:

TTITLE CENTER "Salary Report"
Re: Adding a Header over output table report [message #6739 is a reply to message #6738] Sat, 03 May 2003 04:20 Go to previous messageGo to next message
Naveen
Messages: 75
Registered: June 2001
Member
Hi Barbara,

Shouldn't we use REPHEADER. I thought TTITLE is repeated on each page and REPHEADER is displayed only once at the start of the report. Please correct me if i am wrong.

Thank you.
Naveen.
Re: Adding a Header over output table report [message #6740 is a reply to message #6739] Sat, 03 May 2003 04:47 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9077
Registered: November 2002
Location: California, USA
Senior Member
Naveen,

You are correct, in that REPHEADER will print once per report, whereas TTITLE will print once per page. I suppose it depends on which he wants. I posted my response before I read yours. However, I think I would not use PAGE in the REPHEADER command, unless you want nothing but the header on the first page. Please see my tests below, with and without the PAGE in the REPHEADER.

Barbara

SQL> SET LINESIZE 40
SQL> REPHEADER PAGE CENTER 'Salary Report'
SQL> TTITLE RIGHT 'Page: ' FORMAT 999 SQL.PNO
SQL> SELECT * FROM DUAL
  2  /

                              Page:    1
              Salary Report

                              Page:    2
D
-
X

SQL> REPHEADER CENTER 'Salary Report'
SQL> TTITLE RIGHT 'Page: ' FORMAT 999 SQL.PNO
SQL> SELECT * FROM DUAL
  2  /

                              Page:    1
              Salary Report
D
-
X
Re: Adding a Header over output table report [message #6741 is a reply to message #6740] Sat, 03 May 2003 04:55 Go to previous message
Naveen
Messages: 75
Registered: June 2001
Member
Thanks Barbara,

That was great.

--Naveen.
Previous Topic: How to rollback main procedure depending on nested SP failure
Next Topic: like and quotes data URGENT !!
Goto Forum:
  


Current Time: Fri Mar 29 06:35:37 CDT 2024