Column Alignments in HTM output
sharpeJan 15 2010 — edited Jan 21 2010Hi. I have a SQL script below that outputs 3 columns to an HTM file. It's working without error, but I've noticed that when viewing the HTM output that the column names are centered, but the column values are all left justified. Despite everything I've tried I can't seem to get either the column Names to align left or the column Values to align center. Note that in the code below I've attempted to use the JUSTIFY opition on each column, but it appears to have no affect in the output.
Can anyone help?
set term off;
set echo off;
set feedback off;
set verify off;
set head on;
set pages 99;
set pagesize 50;
set linesize 80;
SET MARKUP HTML ON SPOOL ON HEAD "<TITLE>ADDS Report</title> -
<STYLE TYPE='TEXT/CSS'><!--BODY {background: ffffc6} --></STYLE>"
spool /usr/IBM/WebSphere/AppServerCommunityEdition/repository/default/TTMSWeb/12
22365662123/TTMSWeb-1222365662123.war/scanner_returns_report.htm;
ttitle 'Scanner Returns';
col Device_Status format a13 HEADING 'Device Status' JUSTIFY LEFT;
col Total format a5 HEADING 'Total' JUSTIFY CENTER;
col Staff format a15 HEADING 'Staff' JUSTIFY RIGHT;
select b.device_status Device_Status, rtrim(count(a.reporter)) Total, c.first_na
me||' '||c.last_name||'('||c.guid||')' Staff
from scanner_assignment a, scanner_inventory b, pwc_employee c
where a.manufacturer_nm = b.manufacturer_nm
and a.serial_num = b.serial_num
and a.modify_by = c.guid
and trunc(a.return_dt) = trunc(sysdate-1)
and a.modify_by='&1'
and b.device_status='0'
and b.device_status in('0','8')
group by c.first_name||' '||c.last_name||'('||c.guid||')', b.device_status
order by c.first_name||' '||c.last_name||'('||c.guid||')', b.device_status;
spool off;
exit
/