Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1927
  • Last Modified:

Oracle Forms 6i - Need ASCII comma delimited report

OK.  I need to create a report that displays to the screen in a nice printable view.  I also need the ability to take the data from that report and generate a comma delimited (.CSV) file for Excel.  I thought that I had that answer by going to the File->Generate to a File->Delimited option. Nope.  It created a file that was comma delimited but it put each column name on every line something like

col1_title,col2_title,col1_data,col2_data
col1_title,col2_title,col1_data,col2_data
col1_title,col2_title,col1_data,col2_data
col1_title,col2_title,col1_data,col2_data

This does me no good.  What I need is

Col1_title,col2_title
col1_data,col2_data
col1_data,col2_data
col1_data,col2_data
col1_data,col2_data
col1_data,col2_data

Any help
0
DCCoolBreeze
Asked:
DCCoolBreeze
1 Solution
 
Mark GeerlingsDatabase AdministratorCommented:
Creating "a report that displays to the screen in a nice printable view" may be easier in Oracle Reports (or even SQL*Plus) than in Oracle Forms, but it certainly can be done in Oracle Forms.  Just make sure that you have the background color of your canvas set to white, or you may use a lot of ink or toner if you print from Oracle Forms.

Generating a comma-delimited ASCII file from Oracle can be done by any of these (in my order of preference):
1. SQL*Plus and the "spool" command
2. PL\SQL with utl_file
3. Oracle Reports
4. Oracle Forms (using the built-in package: text_io)

Oracle Forms does support passing a query to Oracle Reports so it can print the results or save them to a file.  But there is no built-in way in Forms to quickly generate an ASCII file of the results that are displayed on the screen.  You can use the procedures in the text_io package to do that, but you need to code that into a trigger or program unit that the operator can call.
0
 
DCCoolBreezeAuthor Commented:
I made a mistake.  I mean Oracle Reports.  I created the report in Oracle Reports.  The delimited option in Oracle Reports does what I describe above
0
 
sujit_kumarCommented:
In the notepad you can replace the "col1_title,col2_title,"
with null.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
DCCoolBreezeAuthor Commented:
What I want to do is get Oracle Reports to convert the file to comma delimited with the first row as title and the following rows as data
0
 
M-AliCommented:
You would need to apply patch 11 or above for the delimited option to work as desired. Upto patch 10 of 6i, the delimited option works as you say above.

So download and apply the patch, and use the DESFORMAT = delimiteddata to get your comma-separated output.


Ali
0
 
DCCoolBreezeAuthor Commented:
how can i get a hold of pach 11?
0
 
Mark GeerlingsDatabase AdministratorCommented:
From Oracle's MetaLink web site:
http://metalink.oracle.com/
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now