Home » Other » Client Tools » SQL*PLUS HTML reports
SQL*PLUS HTML reports [message #318880] Thu, 08 May 2008 06:29 Go to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
hey i have the following code

set arraysize 1 
set heading on
set feedback off 
set verify off
set linesize 150
set pages 9999
set term off
set echo off 
set term off feed off trimspool on RECSEP off
set markup html on spool on preformat off entmap off
spool C:\oracle\ora92\Apache\Apache\scripts\Final_ver1.html
col "Database Uptime" format a140
prompt <HTML>
prompt <HEAD>
prompt <style type="text/css">
prompt </style>
prompt <script type="text/javascript" src="calendar.js"></script>
prompt <script type="text/javascript" src="calendar-en.js"/></script>
prompt <script type="text/javascript" src="calendar-setup.js"/></script>
prompt <link rel="stylesheet" type="text/css" media="all" href="calendar-blue.css" />
prompt <BODY>
Prompt <H3 align="center" style="font-size:200%">ORA Error Report</H3>
prompt <table cellspacing="1" cellpadding="2" border="0" id="myform">
prompt <tbody>
prompt <tr>
prompt <td>From Date:</td>
prompt <td><input type="text" id="fromDate" /></td>
prompt </tr>
prompt <tr>
prompt <td>To Date:</td>
prompt <td><input type="text" id="toDate" /></td>
prompt </tr>
prompt<tr>
prompt<td>Database Name</td>
prompt<td>
prompt<select name="database" id="chk">
prompt<option value="MS">MS</option>
prompt<option value="UNIX">UNIX</option>
prompt</select>
prompt</td>
prompt</tr>
prompt <tr>
prompt <td></td>
prompt <td><input type="submit" value="submit" onclick="get_cal"></td>
prompt </tr>
prompt </tbody>
prompt </table>


prompt <h3 align="center"><b>MS</b></h3>
connect test/test@test 
@C:\oracle\ora92\Apache\Apache\scripts\alert_log.sql


prompt <script type="text/javascript" src="cal_output.js"/></script>

prompt </HEAD>
prompt </BODY>
prompt </HTML>
spool off;
exit


Gives me the ouput which has a lot of blank spaces initially and then spools the ouput.

PS:How do i attach the output snapshot?

Thanks
Re: SQL*PLUS HTML reports [message #318883 is a reply to message #318880] Thu, 08 May 2008 06:34 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
How do i attach the output snapshot?

Put your file path/name in the field at the left of "Upload file" button when you reply and click on this button.

Also post the content of your script.

Regards
Michel
Re: SQL*PLUS HTML reports [message #318889 is a reply to message #318883] Thu, 08 May 2008 06:48 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
I am not able to attach the image. How do i paste the output here?

What else do you want me to post??

[Updated on: Thu, 08 May 2008 07:09]

Report message to a moderator

Re: SQL*PLUS HTML reports [message #318902 is a reply to message #318889] Thu, 08 May 2008 07:23 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
I am not able to attach the image

Why not? Do you not see the "File Attachments" section while creating a message?

/forum/fa/4251/0/
Re: SQL*PLUS HTML reports [message #318946 is a reply to message #318889] Thu, 08 May 2008 08:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
What else do you want me to post??

What is generating the unwanted blank.

Regards
Michel
Re: SQL*PLUS HTML reports [message #319079 is a reply to message #318902] Fri, 09 May 2008 00:15 Go to previous messageGo to next message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
No little foot i see it..but the file does not get uploaded.

Michel the script i have pasted in my first post that generates the HTML page and the blank lines.


set arraysize 1 
set heading on
set feedback off 
set verify off
set linesize 150
set pages 9999
set term off
set echo off 
set term off feed off trimspool on RECSEP off
set markup html on spool on preformat off entmap off
spool C:\oracle\ora92\Apache\Apache\scripts\Final_ver1.html
col "Database Uptime" format a140
prompt <HTML>
prompt <HEAD>
prompt <style type="text/css">
prompt </style>
prompt <script type="text/javascript" src="calendar.js"></script>
prompt <script type="text/javascript" src="calendar-en.js"/></script>
prompt <script type="text/javascript" src="calendar-setup.js"/></script>
prompt <link rel="stylesheet" type="text/css" media="all" href="calendar-blue.css" />
prompt <BODY>
Prompt <H3 align="center" style="font-size:200%">ORA Error Report</H3>
prompt <table cellspacing="1" cellpadding="2" border="0" id="myform">
prompt <tbody>
prompt <tr>
prompt <td>From Date:</td>
prompt <td><input type="text" id="fromDate" /></td>
prompt </tr>
prompt <tr>
prompt <td>To Date:</td>
prompt <td><input type="text" id="toDate" /></td>
prompt </tr>
prompt<tr>
prompt<td>Database Name</td>
prompt<td>
prompt<select name="database" id="chk">
prompt<option value="MS">MS</option>
prompt<option value="UNIX">UNIX</option>
prompt</select>
prompt</td>
prompt</tr>
prompt <tr>
prompt <td></td>
prompt <td><input type="submit" value="submit" onclick="get_cal"></td>
prompt </tr>
prompt </tbody>
prompt </table>


prompt <h3 align="center"><b>MS</b></h3>
connect test/test@test 
@C:\oracle\ora92\Apache\Apache\scripts\alert_log.sql


prompt <script type="text/javascript" src="cal_output.js"/></script>

prompt </HEAD>
prompt </BODY>
prompt </HTML>
spool off;
exit


Html page code:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1252">
<meta name="generator" content="SQL*Plus 9.2.0">
<style type='text/css'> body {font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} 
p {font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} 
table,tr,td {font:10pt Arial,Helvetica,sans-serif; color:Black; background:#f7f7e7; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px;} 
th {font:bold 10pt Arial,Helvetica,sans-serif; color:#336699; background:#cccc99; padding:0px 0px 0px 0px;} 
h1 {font:16pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; border-bottom:1px solid #cccc99; margin-top:0pt; margin-bottom:0pt; padding:0px 0px 0px 0px;} 
h2 {font:bold 10pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; margin-top:4pt; margin-bottom:0pt;} 
a {font:9pt Arial,Helvetica,sans-serif; color:#663300; background:#ffffff; margin-top:0pt; margin-bottom:0pt; vertical-align:top;}
</style>
<title>SQL*Plus Report</title>
</head>
<body>
<HTML>
<br>
<HEAD>
<br>
<style type="text/css">
<br>
</style>
<br>
<script type="text/javascript" src="calendar.js"></script>

<br>
<script type="text/javascript" src="calendar-en.js"/></script>
<br>
<script type="text/javascript" src="calendar-setup.js"/></script>
<br>
<link rel="stylesheet" type="text/css" media="all" href="calendar-blue.css" />
<br>
<BODY>
<br>
<H3 align="center" style="font-size:200%">ORA Error Report</H3>
<br>
<table cellspacing="1" cellpadding="2" border="0" id="myform">
<br>
<tbody>

<br>
<tr>
<br>
<td>From Date:</td>
<br>
<td><input type="text" id="fromDate" /></td>
<br>
</tr>
<br>
<tr>
<br>
<td>To Date:</td>
<br>
<td><input type="text" id="toDate" /></td>
<br>

</tr>
<br>
<tr>
<br>
<td>Database Name</td>
<br>
<td>
<br>
<select name="database" id="chk">
<br>
<option value="MS">MS</option>
<br>
<option value="UNIX">UNIX</option>
<br>

</select>
<br>
</td>
<br>
</tr>
<br>
<tr>
<br>
<td></td>
<br>
<td><input type="submit" value="submit" onclick="get_cal()"></td>
<br>
</tr>
<br>
</tbody>
<br>
</table>

<br>
<h3 align="center"><b>MS</b></h3>
<br>
Connected.
<br>
<p>
<table border='1' width='90%' align='center' summary='Script output'>
<tr>
<th scope="col">
ORA error
</th>
<th scope="col">
TIMESTAMP
</th>
</tr>
<tr>

<td>
ORA-4031: Unable to allocate bytes of shared memory
</td>
<td>
Sat Aug  4 00:01:01 2007
</td>
</tr>
<tr>
<td>
ORA-7445 : exception encountered: core dump
</td>
<td>
Sat Aug  4 00:01:01 2007
</td>
</tr>
<tr>
<td>
.
.
.




[Edit: Frank added linebreaks in code to reduce width of generated page]

[Updated on: Sun, 11 May 2008 10:35] by Moderator

Report message to a moderator

Re: SQL*PLUS HTML reports [message #319310 is a reply to message #319079] Fri, 09 May 2008 14:07 Go to previous message
sdhanuka
Messages: 173
Registered: March 2008
Senior Member
hey i have posted all the scripts...please help me with the error..
Previous Topic: How does a SQL Statement work?
Next Topic: TOAD query that Mirrors the AUD: Interface CIP report
Goto Forum:
  


Current Time: Sun Dec 08 07:18:44 CST 2024