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;
--------------------

Actually, 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.