PL/SQL outputing HTML code [message #5543] |
Thu, 20 February 2003 09:03  |
BPM
Messages: 1 Registered: February 2003
|
Junior Member |
|
|
I currently have an automated PL/SQL procedure that generates a report using dbms_output.put_line. The report loks ok but I would like to be able to use HTML code to format it a little better. Is there a way in PL/SQL to generate HTML code?
Thanks
|
|
|
|
Re: PL/SQL outputing HTML code [message #5558 is a reply to message #5543] |
Thu, 20 February 2003 12:04  |
 |
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
[code]depends on the complexity..
for simple pl/sql code just include ur html tags(ANY TAG U WANT...I HAVE AN REPORT THAT is created with html tables.. to reduce repeated coding i use UTL_FILE) along with the dbms_output
and spool the file as a .html file...
----------------------------------------------------------------------
mag@itloaner1_local > spool c:mag.html
mag@itloaner1_local > declare
2 cursor c1 is select * from dept;
3 begin
4 dbms_output.put_line('< pre >');
5 dbms_output.put_line('< h1 >Report on Databases</h1>');
6 for mag in c1 loop
7 exit when c1%notfound;
8 dbms_output.put_line('< b >Department Name[/b] ='||mag.dname);
9 end loop;
10 end;
11 /
[size=7]Report on Databases[/size]
[b]Department Name[/b] =....ACCOUNTING
[b]Department Name[/b] =......RESEARCH
[b]Department Name[/b] =.........SALES
[b]Department Name[/b] =....OPERATIONS
PL/SQL procedure successfully completed.
mag@itloaner1_local > spool off
----------------------------------------------------------------------
from sql*plus
u can also get simple html reports with
set markup html on
|
|
|