Reports to csv [message #591265] |
Fri, 26 July 2013 01:52 |
|
kolpalamayaw
Messages: 9 Registered: May 2013 Location: TURKEY
|
Junior Member |
|
|
Hi all,
I have a questions about oracle reports. I created the data model as Q_1,Q_2,Q_3
Q_1 like this: select c_name,c_phone from customer
Q_2 like this: select c_polid,c_pid from police
Q_3 like this: select c_bank,c_accountno from bank
I would like to write this report to .csv I created procedure like this:
-------------------
PROCEDURE Print2File (p_str in varchar2, p_tip in varchar2) IS
fp text_io.file_type;
begin
fp := text_io.fopen('x:\Holdingsigortalirap1.csv', p_tip);
text_io.putf(fp, p_str || '\n');
text_io.fclose(fp);
end;
--------------------
And I added to formula column in Q_1,Q_2 and Q_3 like this:
Q_1:
function DOSYAYAYAZFormula return Number is
begin
Print2File (:c_name|| ';' || :c_phone , 'A');
RETURN(0);
end;
----------------
But when I write like this .csv file show:
first row: c_name,c_phone
second row: c_polid,c_pid
third row: c_bank,c_accountno
Actually, I want to all column in first row like this:
first row: c_name,c_phone,c_polid,c_pid, c_bank,c_accountno
------------------
how can I do like this?
Best Regards,
|
|
|
|
|
Re: Reports to csv [message #591355 is a reply to message #591284] |
Fri, 26 July 2013 11:44 |
|
stalin4d
Messages: 226 Registered: May 2010 Location: Chennai, Tamil Nadu, Indi...
|
Senior Member |
|
|
kolpalamayaw wrote on Fri, 26 July 2013 13:21Actually, this report was already c reated by DBA. I dont want to change it. I would like to create .csv file which has report's data.
I too has the same query, I have already a Report which is created via Oracle Reports 6i, well i need to generate this oracle report data into a excel or csv format, directly when clicking the report button, not through generate to file option.
Regards,
Stalin
|
|
|