Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » owa_util.tablePrint is showing timestamp fields as "Not Printable". (Oracle 9.2.0.1.0, windows XP)
|
Re: owa_util.tablePrint is showing timestamp fields as "Not Printable". [message #418749 is a reply to message #418561] |
Tue, 18 August 2009 08:25 |
misragopal
Messages: 125 Registered: June 2005 Location: New Delhi, india
|
Senior Member |
|
|
I checked OWA_UTIL package body also. This package is dealing only with few datatypes, for rest of all, it is showing 'Not Printable'.
See below code part from this package.
Can We customize this package??
if dbms_sql.fetch_rows(crsr) > 0
then
row_count := row_count+1;
for col_counter in 1..nnum_cols
loop
col_dtype := col_dtypes(col_counter);
if (col_dtype = 'VARCHAR2' OR col_dtype = 'CHAR')
then
dbms_sql.column_value(crsr, col_counter, vc_var);
col_size := nvl(lengthb(vc_var),0);
else if (col_dtype = 'NUMBER')
then
dbms_sql.column_value(crsr, col_counter,
number_var);
col_size := nvl(lengthb(number_var),0);
else if (col_dtype = 'DATE')
then
dbms_sql.column_value(crsr, col_counter,
date_var);
col_size := nvl(lengthb(date_var),0);
else if (col_dtype = 'LONG')
then
dbms_sql.column_value(crsr, col_counter,
long_var);
col_size := nvl(lengthb(long_var),0);
else if (col_dtype = 'RAW')
then
dbms_sql.column_value_raw(crsr,
col_counter,
raw_var);
col_size := nvl(lengthb(raw_var),0);
else
col_size := length('Not Printable');
end if;
end if;
end if;
end if;
end if;
|
|
|
|
Re: owa_util.tablePrint is showing timestamp fields as "Not Printable". [message #418888 is a reply to message #418820] |
Wed, 19 August 2009 01:34 |
misragopal
Messages: 125 Registered: June 2005 Location: New Delhi, india
|
Senior Member |
|
|
I found solution.
CREATE TABLE T1
( COL_V VARCHAR2(10),
COL_N NUMBER,
COL_D DATE,
COL_T TIMESTAMP(6),
COL_T6 TIMESTAMP(6)
);
DECLARE
BEGIN
FOR i IN 1.. 25
LOOP
INSERT INTO T1
(col_v, col_n, col_d,
col_t, col_t6)
VALUES(
chr(65+i)||'00'||i, i+20, sysdate+1,
add_months(sysdate,i),add_months(sysdate,i+2));
END LOOP;
END;
after some R&D, i found that if you are not specifying column names in this procedure, you will get 'Not Printable' text.
vBoolVar:= owa_util.tablePrint(
ctable=> 't1',
cclauses =>'order by col_n',
cattributes=>'border="1"');
but if you specify column names in 'ccolumns' (in type) parameter, it will show actual data.
vBoolVar:= owa_util.tablePrint(
ctable=> 't1',
cclauses =>'order by col_n',
ccolumns => 'col_v, col_n, col_d, col_t, col_t6',
cattributes=>'border="1"');
Thanks Andrew, for your reply.
|
|
|
Goto Forum:
Current Time: Wed Dec 04 19:37:06 CST 2024
|