Home » Developer & Programmer » Reports & Discoverer » HTML reports
HTML reports [message #312874] Thu, 10 April 2008 00:35 Go to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Hi,

I need to add some javascripts to the HTML reports that we create using the SQL*plus commands :

SET MARKUP HTML ON SPOOL ON.


This generates by default a <body> and an <html> tag. So to modify my report should i use the Preformat command in sql*plus.

[MERGED by LF]

[Updated on: Fri, 11 April 2008 06:08] by Moderator

Report message to a moderator

SQL*PLUS HTML reports (help please) [message #312887 is a reply to message #312874] Thu, 10 April 2008 01:07 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Hi,

I need to add some javascripts to the HTML reports that we create using the SQL*plus commands :

SET MARKUP HTML ON SPOOL ON 


This generates by default a <body> and an <html> tag. So to modify my report should i use the Preformat command in sql*plus.
Re: SQL*PLUS HTML reports (help please) [message #312897 is a reply to message #312887] Thu, 10 April 2008 01:24 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Don't multipost, you will not get quicker or better answer.

Regards
Michel

[Updated on: Thu, 10 April 2008 01:25]

Report message to a moderator

Re: SQL*PLUS HTML reports (help please) [message #312900 is a reply to message #312897] Thu, 10 April 2008 01:29 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Hi,

Ya that happened by mistake.

I din know how to delete the post.

Sorry.

Submit buttons in HTML report [message #313286 is a reply to message #312874] Fri, 11 April 2008 05:47 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Hi i am using oracle 9i. I need to add buttons and calender to the html report generated by

SET MARKUP HTML ON SPOOL ON
SPOOL filename.html
.
.
.
.
.

please tell me how to do so ?
Re: SQL*PLUS HTML reports (help please) [message #313293 is a reply to message #312900] Fri, 11 April 2008 05:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Moved to Reports & Discoverer forum at OP request.

Regards
Michel
Re: SQL*PLUS HTML reports (help please) [message #313296 is a reply to message #313293] Fri, 11 April 2008 06:01 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Thanks Smile
Re: SQL*PLUS HTML reports (help please) [message #313301 is a reply to message #313296] Fri, 11 April 2008 06:16 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I must admit that I don't quite understand what
SPOOL filename.html
(an SQL*Plus command) has to do with Reports Builder and Business Intelligence Discoverer.

But OK, if you (sdhanuka) want it to be here, fine with me.
Re: SQL*PLUS HTML reports (help please) [message #313306 is a reply to message #313301] Fri, 11 April 2008 06:20 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
I read previous reports on adding radio buttons to the html report.
So i thought this is the right forum for report generation.

Please tell me which forum should i move it to.

Re: SQL*PLUS HTML reports (help please) [message #313312 is a reply to message #313306] Fri, 11 April 2008 06:33 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oh, don't be discouraged! The fact that I didn't create radio buttons in HTML reports created from the SQL*Plus prompt doesn't mean that it can't be done.
Re: SQL*PLUS HTML reports (help please) [message #313313 is a reply to message #313306] Fri, 11 April 2008 06:34 Go to previous messageGo to next message
skooman
Messages: 913
Registered: March 2005
Location: Netherlands
Senior Member
I think it's more like various tools can create output in HTML format (ie Discoverer, OBI EE, Reports) And it now turns out that SQL*Plus can do it too - it never occured to me that it can, underestimated good old SQL*Plus!

Without knowing this functionality at all: I think SQL*Plus just "spools" to HTML, adding some tags to the data. Creating buttons and calenders in SQL*Plus would be a truly new experience to me - I doubt if it's possible.

Getting back to the basics: why do you want this? Why use SQL*Plus to create nice looking reports, while there are so many products out there designed to do just that?
Re: SQL*PLUS HTML reports (help please) [message #313322 is a reply to message #313313] Fri, 11 April 2008 06:51 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
OK i am just few weeks old to oracle 9i.

I do not know about other tools that can create nice looking reports.

Ya i know that spool just creates some basic html tags. Thats the reason why i asked can if i modify that report to add buttons and calendars
Re: SQL*PLUS HTML reports (help please) [message #313329 is a reply to message #313322] Fri, 11 April 2008 07:05 Go to previous messageGo to next message
skooman
Messages: 913
Registered: March 2005
Location: Netherlands
Senior Member
Perhaps you can just use any tool that can edit HTML and edit the result in that tool??

(I have no idea what I'm talking about now, never edited HTML, but I guess there are tools out there...)
Re: SQL*PLUS HTML reports (help please) [message #313342 is a reply to message #313329] Fri, 11 April 2008 07:32 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
After reading about oracle report builder...i am even more confused...Sad....

I need to create simple hmtl reports
Re: SQL*PLUS HTML reports (help please) [message #313351 is a reply to message #313342] Fri, 11 April 2008 08:22 Go to previous messageGo to next message
skooman
Messages: 913
Registered: March 2005
Location: Netherlands
Senior Member
Did you read my last post?

Anyway, I can imagine that tools can seem confusing at first, but there is no other way then start learning the right tool I think. You stated "I need to create simple hmtl reports", that might be true, but if you need more then just showing data (you already found out how to do that), you simply have to use a serious tool for it.
Re: SQL*PLUS HTML reports (help please) [message #313470 is a reply to message #313342] Sat, 12 April 2008 14:04 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9094
Registered: November 2002
Location: California, USA
Senior Member
It is unclear what you want to do, what tool you should use, or what forum this belongs in. If this is mostly related to SQL*Plus, then it belongs in the SQL Clients forum. For web stuff, you probably want iSQL*Plus. If it is specifically related to the Reports of the Oracle Developer Suite, that has nothing to do with reports generated from SQL*Plus, then it belongs here. If it has more to do with HTML, then it may belong in the Application Express forum or APEX for short, which was formerly called the HTMLDB.

If you want to create simple HTML reports, you can use the SQL*PLUS SET commands and SQL SELECT command to do that:

SCOTT@orcl_11g> SET DEFINE OFF SCAN OFF
SCOTT@orcl_11g> SET MARKUP HTML ON
SCOTT@orcl_11g&gt; SELECT * FROM dept
<br>
  2  /
<br>
<p>
<table WIDTH='90%' BORDER='5'>
<tr>
<th scope="col">
DEPTNO
</th>
<th scope="col">
DNAME
</th>
<th scope="col">
LOC
</th>
</tr>
<tr>
<td align="right">
        10
</td>
<td>
ACCOUNTING
</td>
<td>
NEW YORK
</td>
</tr>
<tr>
<td align="right">
        20
</td>
<td>
RESEARCH
</td>
<td>
DALLAS
</td>
</tr>
<tr>
<td align="right">
        30
</td>
<td>
SALES
</td>
<td>
CHICAGO
</td>
</tr>
<tr>
<td align="right">
        40
</td>
<td>
OPERATIONS
</td>
<td>
BOSTON
</td>
</tr>
</table>
<p>

SCOTT@orcl_11g&gt; 
<br>
SCOTT@orcl_11g&gt; SET MARKUP HTML OFF
<br>
SCOTT@orcl_11g> spool off


If you want to add things like radio buttons, you can do that manually, by editing your file. Here is an example:

http://www.htmlcodetutorial.com/forms/_INPUT_TYPE_RADIO.html

Oracle has some built-in pl/sql functions and procedures that can be called from SQL, for example:

SCOTT@orcl_11g> CREATE TABLE pizza_size
  2    (name	    VARCHAR2 (10),
  3  	value	    VARCHAR2 (10),
  4  	checked     VARCHAR2 (10),
  5  	attributes  VARCHAR2 (10))
  6  /

Table created.

SCOTT@orcl_11g> INSERT ALL
  2  INTO pizza_size VALUES ('pizzasize', 'S', NULL, 'small')
  3  INTO pizza_size VALUES ('pizzasize', 'M', 'CHECKED', 'medium')
  4  INTO pizza_size VALUES ('pizzasize', 'L', NULL, 'large')
  5  SELECT * FROM DUAL
  6  /

3 rows created.

SCOTT@orcl_11g> SELECT htf.formradio (name, value, checked, attributes) FROM pizza_size
  2  /

HTF.FORMRADIO(NAME,VALUE,CHECKED,ATTRIBUTES)
--------------------------------------------------------------------------------
<INPUT TYPE="radio" NAME="pizzasize" VALUE="S" small>
<INPUT TYPE="radio" NAME="pizzasize" VALUE="M" CHECKED medium>
<INPUT TYPE="radio" NAME="pizzasize" VALUE="L" large>

SCOTT@orcl_11g> 


This is explained in the documentation here:

http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/w_htf.htm#sthref15490

If you want some GUI that allows you to create things through menus, rather than manually typing things in, then you probably want something like Application Express or the Oracle Developer Suite with Forms and Reports.


Re: SQL*PLUS HTML reports (help please) [message #313489 is a reply to message #313470] Sun, 13 April 2008 02:36 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Hi thanks for the valuable inputs.

But SET MARKUP HTML ON SPOOL ON dynamically creates html tables and tags. I want to control and edit the tables it creates like add a table id and submit buttons.

If i edit the html page it would not matter because each time i spool it a new page will get created and the older edited report will be replaced. I have never used oracle reports.

The documentation you gave me on HTF is of oracle 11g. I am working on oracle 9i.

Re: SQL*PLUS HTML reports (help please) [message #313526 is a reply to message #313489] Sun, 13 April 2008 08:20 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
sdhanuka wrote on Sun, 13 April 2008 09:36
The documentation you gave me on HTF is of oracle 11g. I am working on oracle 9i.

... which, of course, means that you are unable to find documentation for the version you use and would like someone to provide a direct link to what you need.

Did you read OraFAQ Forum Guide? It contains "Useful sites" section. So, why wouldn't you search for documentation yourself?
Re: SQL*PLUS HTML reports (help please) [message #313531 is a reply to message #313526] Sun, 13 April 2008 08:33 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
You can always print the required HTML tags yourself. For example:

spool index.htm
prompt <FORM>
prompt <H1>Please enter your name:</H1>
prompt <INPUT TYPE=text NAME=name>
prompt <INPUT TYPE=SUBMIT VALUE="Go">
prompt </FORM>
spool off

Re: SQL*PLUS HTML reports (help please) [message #313535 is a reply to message #313526] Sun, 13 April 2008 08:44 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Thanks Frank.

Apart from creating buttons I wanted to add a few javascripts to the html reports created by sql*plus. How to do that do we add this:

prompt < script type=text/javascript>
function cal()
{
for statements..
{
if( condition)
{
.
.
}
}
}
</script>
Re: SQL*PLUS HTML reports (help please) [message #313540 is a reply to message #313535] Sun, 13 April 2008 08:54 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
You can print it out line by line.

Another method would be to load the text into a table and just SELECT from it (order by line#).
Re: SQL*PLUS HTML reports (help please) [message #313546 is a reply to message #313540] Sun, 13 April 2008 10:29 Go to previous message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
Hey Frank,

I didn't quite understand your solution Sad i am sorry but please tell me a bit more in detail.


Should i post the report i have already created that generates html tables?
Previous Topic: calendar in date parameter
Next Topic: REPORT OPENS AT SERVER
Goto Forum:
  


Current Time: Wed May 15 17:51:10 CDT 2024