Data Export to Excel file [message #413039] |
Tue, 14 July 2009 01:41 |
ab_trivedi
Messages: 460 Registered: August 2006 Location: Pune, India
|
Senior Member |
|
|
Dear All,
i want to add one button in the form like "save as" and save the displayed data into excel file.
Any one please suggest how to proceed.
Bye
Ashu
|
|
|
|
Re: Data Export to Excel file [message #413113 is a reply to message #413039] |
Tue, 14 July 2009 07:24 |
blaxmi
Messages: 36 Registered: May 2008 Location: Hyderabad
|
Member |
|
|
hi
you can use rp2xls.run procedure in the report.
call the report from the form and in the form it will open .pdf report.
use one button in the report to save the data in the excel sheet.
bye
|
|
|
|
|
Re: Data Export to Excel file [message #413472 is a reply to message #413039] |
Wed, 15 July 2009 23:13 |
blaxmi
Messages: 36 Registered: May 2008 Location: Hyderabad
|
Member |
|
|
Hi,
Use this code in the button called "formtoexcel" in your .fmb
declare
ReptName Varchar2(100) ;
BEGIN
ReptName := 'D:\Desktop items\laxmi\Internal Projects\dvdnd_curr\un_paid_folio_no.rdf';
Run_Product(REPORTS, ReptName, Synchronous, Runtime, Filesystem, pl_id, Null) ;
END;
Then the report will opened in the pdf format.
In the report u just place one text field out of all the frames and in PL/SQL editor write the code as below:
RPT2XLS.put_cell(1, 'heading1', FontColor => 11, FontSize => 12);
RPT2XLS.put_cell(2, 'heading2', FontColor => 11, FontSize => 12);
RPT2XLS.put_cell(3, 'heading3', FontColor => 11, FontSize => 12);
RPT2XLS.new_line;
In the report Layout model press edit margin in the tools provided. Place one button and name that accordingly. In the pl/sql editor write rpt2xls.run then compile the report.
Run the report from the form pdf file will be opened then press the button in the report then it will be transformed into excel.
|
|
|
Re: Data Export to Excel file [message #413645 is a reply to message #413472] |
Thu, 16 July 2009 22:39 |
|
hi laxmi,
thanks for the code. I did try using the code in one of my FMB AND RDF FILE as per your instruction.
I created a button in FMB and used this code and it gives the report
declare
ReptName Varchar2(100) ;
BEGIN
ReptName := 'D:\Desktop items\laxmi\Internal Projects\dvdnd_curr\un_paid_folio_no.rdf';
Run_Product(REPORTS, ReptName, Synchronous, Runtime, Filesystem, pl_id, Null) ;
END;
when i use this code in rdf file it gives an compilation error
identifier not found.
RPT2XLS.put_cell(1, 'heading1', FontColor => 11, FontSize => 12);
RPT2XLS.put_cell(2, 'heading2', FontColor => 11, FontSize => 12);
RPT2XLS.put_cell(3, 'heading3', FontColor => 11, FontSize => 12);
RPT2XLS.new_line;
and even the rpt2xls.run also is not being accepted.
I have attached the fmb and rdf file with the codes entered. It would be great if u could make the necessary corrections and send it.
thanks in advance
lacchhii
-
Attachment: Kfa_07.RDF
(Size: 184.00KB, Downloaded 2182 times)
|
|
|
|
|
Re: Data Export to Excel file [message #413917 is a reply to message #413660] |
Sat, 18 July 2009 20:58 |
|
hi,
thanks for the corrections made in the rdf file. even after the changes it throws a compilation error.
I have attached a screen shot of the error message for your perusal.
one more thing i am using reports 6i and oracle 8i. Is the error because of this.
thanks for your help in advance
-
Attachment: RP2XLS.pdf
(Size: 57.37KB, Downloaded 3495 times)
|
|
|
Re: Data Export to Excel file [message #413969 is a reply to message #413039] |
Sun, 19 July 2009 22:52 |
blaxmi
Messages: 36 Registered: May 2008 Location: Hyderabad
|
Member |
|
|
hi,
i could not open the pdf document that attached. save the screen shot in the word file and attach it again.
in google search the solution for the error message that you are getting.
anyway send the screen shot to me so that i will try to solve your problem.
bye
|
|
|
Re: Data Export to Excel file [message #413997 is a reply to message #413969] |
Mon, 20 July 2009 01:25 |
|
hi,
the word doc is not allowed to be attached. thats why i attached a pdf . I am attaching a jpg file . see if you can open it. or else if you can give me your email id , i can send it to your email id.
narayan
-
Attachment: RP2XLS.jpg
(Size: 102.89KB, Downloaded 2118 times)
|
|
|
|
Re: Data Export to Excel file [message #414200 is a reply to message #414006] |
Mon, 20 July 2009 23:08 |
|
hi,
sorry to bother you again. I did try to use the code in layout boilerplate in a text box as shown in your screenshot, but the error still persits.
I have attached the screenshot again alongwith your screen shot file for your reference.
the report is already attached in the name kfa_07 in this thread.
kindly let me know where i am going wrong.
narayan
-
Attachment: RP2XLS.pdf
(Size: 315.53KB, Downloaded 2802 times)
|
|
|
Re: Data Export to Excel file [message #414205 is a reply to message #413039] |
Mon, 20 July 2009 23:42 |
blaxmi
Messages: 36 Registered: May 2008 Location: Hyderabad
|
Member |
|
|
Hi,
Instead of modifying your report here i'm attaching my report file for your perusal.
I hope you can understand the problem in your report when you see my report.
|
|
|
|
|
Re: Data Export to Excel file [message #414772 is a reply to message #414654] |
Thu, 23 July 2009 07:45 |
|
hi,
thanks a lot for your help. I did try as per your report. the mistake i had done was i had not created a package body and once i copied the code in the package body the report was compiled without errors and i got the report output.
But i couldn't locate the excel file of the same report. Do i have to specify any path in the report or will it be there in any default path?
narayan
|
|
|
Re: Data Export to Excel file [message #414884 is a reply to message #414654] |
Thu, 23 July 2009 23:28 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
@B.Laxmi,
You can use 'text_io' to write your data to a 'csv' file. Each field is separated from the previous by a comma.
You then open the file with a spreadsheet processor. Much simpler than going through all the other stuff.
David [EDITED by DJM: fix typos]
[Updated on: Thu, 17 September 2009 20:39] Report message to a moderator
|
|
|
Re: Data Export to Excel file [message #418532 is a reply to message #413039] |
Mon, 17 August 2009 01:39 |
becklery
Messages: 8 Registered: April 2009
|
Junior Member |
|
|
Hi, ab_trivedi.
I think you can use RAQ Report. First, you need to make a web report with it, and it is very easy. Second, you can input your desired data. Third, you can export the report to an Excel file with only a click. Is it very easy?
|
|
|
|