How to generate PDF output from OracleXMLQuery

I want to generate a PDF out put from XML by using JSP. For this i writen jsp and xsl. My jsp code works fine if i include html formated xsl and it displays as a text when i pass pdf formated xls.
Here i am providing my jsp code.
I don't want to use XSQL, please provide me information ASAP.
<%@ page import = "java.sql.*,oracle.xml.sql.query.OracleXMLQuery" %>
<% Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
String dbURL = "jdbc:oracle:thin:@localhost:1521:oracle9i";
try{
     DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
     conn = DriverManager.getConnection(dbURL, "scott", "tiger");
     stmt = conn.createStatement ();
     rset = stmt.executeQuery ("SELECT * " +
               "FROM scott.emp ORDER BY ename");
OracleXMLQuery xq = new OracleXMLQuery(conn, rset); %>
<% xq.setStyleSheet("emptablefo.xsl"); %>
<%= xq.getXMLString() %>
<% } catch (java.sql.SQLException e) {  %>
SQL error: <%= e %>
<% }
finally {
if (stmt != null) stmt.close();
if (rset != null) rset.close();
if (conn != null) conn.close();
} %>
Thanks,
Ramana

>
if the report output format is xls this code is generating the pdf output
>
looks like pdf is default output in template definition in xml publisher resp
so for r12 use FND_REQUEST.ADD_LAYOUT as example
v_request_id   number;
xml_layout boolean;
xml_layout := FND_REQUEST.ADD_LAYOUT('XXCUSTOM','XXCONCNAME','en','00','EXCEL');
v_request_id := fnd_request.submit_request(application => 'XXCUSTOM',
                                           program     => 'XXCONCNAME',
                                           description => NULL,
                                           start_time  => NULL,
                                           sub_request => FALSE,
                                           argument1   => p_date
                                           );also see http://andyblg.wordpress.com/2012/08/23/run-concurrent-program-twice-with-different-layout-r12/

Similar Messages

  • How to Generate CSV Output from JD Edwards BI Publisher

    Hi All,
    I have a report "Critical Date Report" - R15611 in JD Edwards 8.11. This report has to be generated as CSV output from BI Publisher which is embedded to JDE.
    The purpose we want use BI Publisher is to move some of the data displaying to different place in the page(ex: Move the company address from top left corner to Bottom right corner).
    In order to achieve this
    1.We created blank rtf template and upload to XML repository using P95600 application
    2.Create report definition using P95620 application
    3.Here I see the available output types as PDF,RTF,HTML,EXCEL,POWERPOINT and XML,ETEXT(GRAYED OUT)
    Which output type we can use for CSV ?
    4.Execute the report definition of the critical date report from P95620 to get the XML source
    5.This XML source will be loaded into the blank rtf template
    6.From this point no idea how to design the rtf template in order to get the CSV output.
    7.We did design and output type as excel - but the result data is not in good formatting and alignment*(Headers and footers are repeating).*
    If any one has worked on similar type of requirement,let us know how to do or send a sample XML source,rtf template and how the CSV output will be. Or any document link present in Oracle site will be helpful. Please let me know if you need more details.
    Thanks in Advance.
    Vijay

    Hi Vijay,
    For CSV output, you need an E-text template (not RTF) that's why its grayed out! You can use Excel as output type and have (No headers and footers) , then you can open the file in Excel and store it as CSV. Does not always display correctly though.
    Why are you compelled to use BI publisher? you can use the JDE standard csv output report, (as is used by most EDI systems) of course this may involve a bit of customization if you wants the fields arranged differently.
    -Domnic

  • How to generate PDF file from HTML file using Acrobat API's

    Hi,
    I want to generate a PDF file from an HTML file on server side(C# .Net).
    Their is a COM interop called "AcrobatWeb2PDF" availaible but could not find any document regarding how to use it.
    I cant use "Adobe live cycle PDF Generator" as we just have license for Adobe Acrobat 8 Professional.
    Please help...
    Thanks and Regards,
    Anand Mahadik.

    > It is hard to believe that Adobe doesn't provide a toolkit for generating PDF files, so many web based applications have vector based content that needs to be converted to PDF!!!!
    They do, it's just not free (A company in business to make money? I'm sure IBM would never think this way... ;)). As mentioned you have Adobe LiveCycle PDF Generator, which you can customize and extend with Java. You also have the Adobe PDF Library SDK, which is written for use with C/C++ although if you license it from Datalogics (the only company in NA Adobe allows to license the PDF Library) you will also get .NET and Java interfaces (part of the DLE - DataLogics Extensions).
    > There must be a way to generate PDF dynamically on a server or from Javascript!
    JavaScript? Not really, no. As far as I'm aware JavaScript has no file system access capabilities without some form of intermediary (like sending the data to a webservice that writes it out to file). How would you create a PDF file with JavaScript?
    The PDF Standard is also in ISOs hands now (ISO 32000-1:2008), it is no longer owned by Adobe - you can download a copy of the specification from them and write your own library based on that as well.

  • Generating pdf output from reports 6i

    Hi,
    I want to generate the report in pdf format on clicking an hyperlink...
    this is my key...
    key1: server=Rep60_XP-OraHome8i report=Test_Report.rdf userid=xx/yyy@db desformat=PDF destype=file desname=test.pdf
    my hyperlink URL is
    http://mywebserver/cgi-bin/rwcgi60.exe?key1
    on clicking it, i get the output, that is the pdf file is written to the destination c:\orant\bin\test.pdf...
    but i want the pdf file to immediately open instead of saving it into the disk..
    how do i do that???
    Thanks.

    found the answer..
    just had to use destype=cache instead of file
    Thanks.

  • How to generate multiple output pdf's from one oracle reports

    how to generate multiple output pdf's from one oracle reports.
    I have a report where I have to generate more than one output files from the same report based on a parameter.
    Each output file is for each parameter.
    Is this possible in oracle reports, is so how ?

    You can better post your question in the reports forum instead of this pl/sql forum.

  • Generate PDF file from oracle Table

    We need to populate pdf file into oracle table of column blob through informatica by taking
    path\name(/path/filename.PDF) as input from source table.
    The pdf file is on some other server so, we need to create a stored procedure which will give pdf file as output from
    other server by taking path\name from source table column as mentioned above.
    So please suggest how we can create a stored procedure for that purpose.
    If possible please share some script.

    Dear all,am new to oracle report and oracle forms and i know the
    basics how to generate the report and to create the form, Now my doubt is, like generating report
    from oracle report how to generate the report from oracle from,should i add any command button? and where
    to add the coding and what coding ? when i click that command button the report should be generated like oracle
    report,what should i do?Please help me to learn.
    my table name is 'student' and it has the following columns,
    sid,sname,grade,result.
    Am using oracle from 10.1.2.0.2 version and
    oracle report version is 10.1.2.0.2.
    Please give step by step procss.
    Thank you.

  • Generating PDF output with DITA-FMx

    I am evaluating DITA-FMx to get professional PDF output from my ditamaps and thanks to the useful video from saprentice, I am able to get a working PDF, with numbered chapters, page numbering, and so on. But now I am stuck with the following:
    - Preface and notices are numbered and they shouldn't. How do I remove numbering from them?
    - chapters appear twice in the TOC: once numbered and then again without numbers.
    Thanks

    The preface and notices are numbered because they are using the default template (assumed to be "chapter"). You'll need to set up and assign a "component template" for those component types. I assume you're using a bookmap .. so you should be able to create component templates called "tpl~preface.fm" and "tpl~notices.fm" .. put those in your component templates folder (as specified in the ditafmx-bookbuild.ini file), and those templates will be applied to the corresponding book components. You'll need to modify the EDD that is within those templates so it applies a different paragraph tag to top-level title (take a careful look at the sample tpl~appendix.fm component template which does this same thing for appendix components.
    The duplicate chapter references in the TOC are a bit puzzling. Keep in mind that the TOC creation is fundamentally the same as you would have done in unstructured Frame. It's controlled by the TOC reference page in the TOC template ("gentpl~toc.fm"), and the tags specified in the GeneratedFile-toc section of the ditafmx-bookbuild.ini file. If you can make this work by manually setting things in the generated files, you should be able to translate that into the files to make it work through FMx.
    Also .. be sure to check the FrameMaker console window after a book build .. you may see messages that help to debug any problems.
    BTW .. a good place to post this sort of question is to the dita-fmx-users Yahoo group.
    Cheers,
    ...scott
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • Generate .PDF file from Oracle Form and print .pdf

    Hello, I am new to oracle form. I need direction on how to create .pdf file on a button click.
    The requirement is when user click a button on a form, I need to write some data to the pdf file and open the .pdf file for print.
    I am using Oracle Form builder 10.1.2.0.2
    Thanks a lot! Please help!

    Dear all,am new to oracle report and oracle forms and i know the
    basics how to generate the report and to create the form, Now my doubt is, like generating report
    from oracle report how to generate the report from oracle from,should i add any command button? and where
    to add the coding and what coding ? when i click that command button the report should be generated like oracle
    report,what should i do?Please help me to learn.
    my table name is 'student' and it has the following columns,
    sid,sname,grade,result.
    Am using oracle from 10.1.2.0.2 version and
    oracle report version is 10.1.2.0.2.
    Please give step by step procss.
    Thank you.

  • How to move PDF file from Spool to Application Server?

    How to move PDF file from Spool to Application Server?
    Cannot use RSTXPDFT4 because that converts OTF to PDF and the file is already PDF.
    RSTXPDFT5 doesn't work. It picks the file up and assigns it a 'text' type and outputs a 1 line txt (1kb in size) on the server with the spool number in it!
    The program which outputs the file to the spool, in the first place, uses adobe forms and outputs to a printer of type PDF.

    Hi Gemini ,
    Please refer the below links.
    [http://sap.ittoolbox.com/groups/technical-functional/sap-hr/convert-a-spool-to-pdf-and-save-on-application-server-in-background-720959]
    [http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15]
    Edited by: Prasath Arivazhagan on Apr 13, 2010 4:48 PM

  • How to generate an idoc from invoice cancellation (VF11)

    Hi
    How to generate an idoc from invoice cancellation (VF11)?
    Can someone help ..
    Regards
    Pratiksha

    Hi,
    You can generate an IDOC from invoice cancellation.Define a new "Z" output type for this cancellation billing document type and select the medium as 5(EDI).Check with your ABAPer for this.
    Regards,
    Krishna.

  • How to configure PDF output

    Is it possible to change the style and look of a generated PDF file from RoboHelp?

    Hi,
    I'm not using DITA maps, but I create printed documentation (pdf) from RoboHelp HTML. My previous post had nothing to do with RoboHelp for Word, sorry for the misconception. You create a word document or a pdf whenever you output printed documentation.
    To create a pdf, I output printed documentation. As far as I know, RoboHelp always makes a Word document which it then converts to pdf. I just don't let RoboHelp generate the PDF so I can still change the Word document. In the printed documentation screen, deselect Generate Adobe PDF and select Generate Word doc. Just modify the word document and then create a pdf out of that.
    Greets,
    Willam

  • Generating PDF file from PL/SQL

    Hello,
    I'm new using XML DB. I have XML data and a stylesheet stored into the database but i don't know how to generate PDF files.
    I' ve already tried to load Apache FOP into the DB and that's work very well. Is there any other solution using only Oracle's PL/SQL environment ???
    Thanks for your help.
    Lionel from Switzerland.

    can you provide the steps that you used to load fop into the database?
    which db version, and which fop version? When I tried to follow the cmsxdb load into a 10g instance I had numerous resolution errors.
    please help

  • Error while Generating PDF file from Datagridview .

    Hi every one,
         I'm trying to generate pdf file from datagridview,while executing my code getting nullvalue exception..
    Here is my code:
    private void btnexportPDF_Click(object sender, EventArgs e)
                //Creating iTextSharp Table from the DataTable data
                PdfPTable pdfTable = new PdfPTable(dataGridView1.ColumnCount);
                pdfTable.DefaultCell.Padding = 3;
                pdfTable.WidthPercentage = 30;
                pdfTable.HorizontalAlignment = Element.ALIGN_LEFT;
                pdfTable.DefaultCell.BorderWidth = 1;
                //Adding Header row
                foreach (DataGridViewColumn column in dataGridView1.Columns)
                    PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText));
                    cell.BackgroundColor = new iTextSharp.text.BaseColor(240, 240, 240);
                    pdfTable.AddCell(cell);
                //Adding DataRow
                foreach (DataGridViewRow row in dataGridView1.Rows)
                    foreach (DataGridViewCell cell in row.Cells)
                        pdfTable.AddCell(cell.Value.ToString());//nullvalue exception
                //Exporting to PDF
                string folderPath = "C:\\PDFs\\";
                if (!Directory.Exists(folderPath))
                    Directory.CreateDirectory(folderPath);
                using (FileStream stream = new FileStream(folderPath + "DataGridViewExport.pdf", FileMode.Create))
                    Document pdfDoc = new Document(PageSize.A2, 10f, 10f, 10f, 0f);
                    PdfWriter.GetInstance(pdfDoc, stream);
                    pdfDoc.Open();
                    pdfDoc.Add(pdfTable);
                    pdfDoc.Close();
                    stream.Close();
    Thanks & Regards RAJENDRAN M

    Hi Rajendran,
    The second question is about the usage of iTextSharp library, which is not a MS product, please post in their forum for help:
    http://support.itextpdf.com/forum
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to download PDF attachment from gmail on iphone 5S

    Hi,
    How to download PDF attachment from gmail on iphone 5S
    Regards
    Ram

    Hello Ram2910
    You should be able to view them natively within iOS. If you can view them in safari and want to save them, then download iBooks or search for other apps that can view and save them.
    iBooks
    https://itunes.apple.com/us/app/ibooks/id364709193?mt=8
    iBooks: Viewing, syncing, saving, and printing PDFs on iPhone, iPad, and iPod touch
    http://support.apple.com/kb/ht4227
    Regards,
    -Norm G.

  • How to upload pdf file from windows cell phone?

    How to upload pdf file from windows cell phone?

    You can do this in steps.. First use the built in method for uploading a file into the flows files object, Next you would copy the file out to an Oracle built directory on your UNIX box using utl_file.put_raw..
    Here is a link to show you how to upload files in an APEX application [http://download.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm]
    And here is a link to show you how to use utl_file.put_raw.. [http://psoug.org/reference/utl_file.html], item is towards the bottom of the screen..
    Thank you,
    Tony Miller
    Webster, TX

Maybe you are looking for

  • Pyskopaint install fails windows 8.1

    [2014-07-18:12:16:28] Runtime Installer begin with version 14.0.0.110 on Windows 8 x86 [2014-07-18:12:16:28] Commandline is: [2014-07-18:12:16:28] No installed runtime detected [2014-07-18:12:16:32] Relaunching with elevation [2014-07-18:12:16:32] La

  • Which Linux Distro Works Out of the Box With the iMac late 2009 (11,1)?

    Hi. I use all 3 OSes because the other two OSes have tool and games that are not yet in OS X; best of both worlds. Win 8 on Bootcamp is nice for games and utilities but I'm installing Linux too on a separate external drive. I've tried a lot of Linux

  • Error in Acrobat 6.0 When Opening PDF Sent from Acrobat 9.0

    The following error occurs: "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem" When opening a PDF sent from Acrobat 9.0.  I have Acrobat 6.0. The o

  • Crystal Report Integration with BW 70

    Crytal Integration with SAP BW   Posted: Apr 21, 2008 6:53 PM       E-mail this message      Reply  Need help. I have read some links at SDN, like Getting started link on BO and also http://www.businessobjects.com/product/packages/ to understand do w

  • Slow printing networked 64 bit win 7

    I have read many many posts about this.  HOWEVER, I print directly to the printers.  Http via Cups. I can load my old XP machine as a VM on the windows 7 machine and it prints immediately!  What I have done so far; 1) Disabled items with netsh int tc