XML Publisher reports through OAF in R12

Every time I submit a concurrent request I am unable to put a layout and thus no report is generated. If I run the report through forms there are no issues and everything works great. If I run it through OAF the layout never gets added to the request. All of the previous threads deal with versions of Oracle earlier than what I'm working with.
Here are the details when ran through OAF: http://i.imgur.com/bBYOe.png
Here are the details when ran through forms: http://i.imgur.com/1gfEt.png
Here's my current code:
This is in the AM.  public int submitCPRequest() {
    try
    OADBTransaction tx = (OADBTransaction)getDBTransaction();
    java.sql.Connection pConncection = tx.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(pConncection);
    String applnName = new String("UNIApps"); //Application that contains the concurrent program
    String cpName = new String("UNIA_OAF_XML_TEST"); //Concurrent program name
    String cpDesc = new String("");
    String time = new String("");
    // Pass the Arguments using vector
    Vector cpArgs = new Vector();
    // Calling the Concurrent Program
    cr.addLayout(applnName,cpName,"en","US","PDF","AMERICAN");
    //cr.addLayout(applnName,cpName,"en","US","PDF",null);
    int requestId = cr.submitRequest(applnName, cpName, cpDesc, time, false, cpArgs);
    tx.commit();
    return requestId;
    }catch(Exception e)
    OAException oe = new OAException(e.getMessage());
    oe.setApplicationModule(this);
    throw oe;
    }This is in the CO.  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("report") != null)
       String requestId = am.invokeMethod("submitCPRequest").toString();
       //requestId = "27546040";
       Serializable params[] = {
           requestId
       pageContext.getApplicationModule(webBean).invokeMethod("getOutputURL", params);
       String outputURL = (String)pageContext.getTransactionValue("OutputURL");
       try
           pageContext.sendRedirect(outputURL);
           return;
       catch(Exception exception)
           throw new OAException(exception.getMessage());
   }

thank u . the code useful for me

Similar Messages

  • Have messy code when open a xml publisher report in OAF

    Dear all,
    I use xml publisher to generate a pdf report in OAF,but have messy code when open pdf report in my local machine.
    I try to change the pdf to html format,and the report display ok in local machine.
    It's also ok when i run in server.
    So i think may be my project'Character Encoding in Jdeveloper tool is wrong,
    i try to set the character encoding 'UTF-8/UTF8/GBK/GB2312',
    but still have messy code.
    Here is my code:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModuleImpl am= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
    String event = pageContext.getParameter("event");
    if("GenerateReport".equals(event))
    String auctionHeaderId=(String)pageContext.getParameter("auctionHeaderId");
    Serializable[] Parameters = {auctionHeaderId};
    // Get the HttpServletResponse object from the PageContext. The report output is written to HttpServletResponse.
    DataObject sessionDictionary = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
    HttpServletResponse response = (HttpServletResponse)sessionDictionary.selectValue(null,"HttpServletResponse");
    try {
    ServletOutputStream os = response.getOutputStream();
    // Set the Output Report File Name and Content Type
    String contentDisposition = "attachment;filename=EmpReport.pdf";
    response.setHeader("Content-Disposition",contentDisposition);
    response.setContentType("application/pdf");
    // Get the Data XML File as the XMLNode
    XMLNode xmlNode = (XMLNode) am.invokeMethod("auctionHeaderById",Parameters);
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    xmlNode.print(outputStream);
    ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
    ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
    //Generate the PDF Report.
    TemplateHelper.processTemplate(
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
    APP_NAME,
    TEMPLATE_CODE,
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
    inputStream,
    TemplateHelper.OUTPUT_TYPE_PDF,
    null,
    pdfFile);
    // Write the PDF Report to the HttpServletResponse object and flush.
    byte[] b = pdfFile.toByteArray();
    response.setContentLength(b.length);
    os.write(b, 0, b.length);
    os.flush();
    os.close();
    catch(Exception e)
    response.setContentType("text/html");
    throw new OAException(e.getMessage(), OAException.ERROR);
    pageContext.setDocumentRendered(false);
    pls help me !
    thanks,
    Tao.

    Can anybody help me?
    Best regards!
    Tao

  • Download XML Publisher report through URL

    Hi Gurus,
    I need to download pdf that which is generated using data template(.xml) and Layout template(.rtf) from XML Publisher through URL by passing required parameter.
    Could anyone please help me on this. This is one of our client requirement. Its really very urgent.
    Thanks,
    Vino.

    is it ebs?
    if yes i can not be sure what it is work for ebs
    for ebs related bip you can ask in General EBS Discussion

  • Calling XML Publisher Report from OAF using the conc programs xml output

    Hi all
    I am trying to call a report from oa Framework. I have developed the Template in the Ms-Word and for Generating the xml data i used the view object defined in OAF, this approach is working for me...i used the following code to do this in the AM as mentioned in many places...
    public XMLNode getEmpDataXML()
    OAViewObject vo = (OAViewObject)findViewObject("EmpVO1");
    XMLNode xmlNode = (XMLNode) vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS);
    return xmlNode;
    now i want that instead of the view object i should use the xml generated by the report which is registered as concurrnet program with output as xml.
    I am submitting the concurrent program and able to get the request id ...
    Now from here what should i do.. please suggest...

    Hi,
    I am thinking of doing something very similar. What i was planning on doing is submitting the request, and then redirecting the user to the concurrent request page. They can then use the standard functionality to view output and get the xml to use the appropriate template.
    i would be interested in how you get the concurrent request id from the submitted job.
    Many thanks
    Rupesh

  • Xml publisher  report genarate through Url.

    Hi All,
    I need to call the XML Publisher report through url Please anyone help this .

    is it ebs?
    if yes i can not be sure what it is work for ebs
    for ebs related bip you can ask in General EBS Discussion

  • Calling XML Publisher report(RDF based) From OAF

    Hi All,
    I have requirement where i need to call one of the custom XML Publisher report from oaf by passing the parameters.
    and i dnt want this using concurrent program.
    I have an idea of calling xml publisher report which is Data Template based(XML).
    http://oracle-hack.blogspot.ae/2012/04/launching-xml-publisher-from-oa.html
    but in my case the report is RDF based.
    They are generating the XML using one of the custom rdf. How can we achieve this?
    Please help.

    Hi,
    Thanks for the reply.
    Yeah yes. this method i know in my case the Custom XML Report is based on a rdf.
    So just i want to know it can be achievable ir not? if so how?
    Thanks
    Bharat

  • Unable to print xml publisher report in excel format in R12

    Hi All,
    We are unable to print xml publisher report in excel format in R12. We were able to see the excel output but it's printing junk characters while printing and it's printing without any issue with PDF format.
    Please let me know how to fix this issue.
    Thanks,
    Raja

    Hi Raja,
    I presume you have gone through the debugging process of testing your template locally first to get the expected result.....
    If yes, this note might probably be helpful "Changing Output Format to RTF or Excel in XML Publisher Request Does Not Display Output Correctly (Doc ID 404512.1)"
    Good Luck,
    Lamine Balde

  • OAF page with XML Publisher report

    Hi All,
    I am trying to create a OAF page with an XML Publisher report. I am not able to create a 'defaultSingleColumn' region which extends '/oracle/apps/xdo/oa/common/webui/DocumentViewerRn.MainRegion', getting a Confirm message and Validation error and they are:
    Confirm message:
    Component "/oracle/apps/xdo/12.0.0/mds/oa/common/webui/DocumentViewerRn.MainRegion" cannot be referenced from
    "/xx/oracle/apps/xxbsk/payslip/webui/PaySlipViewPG.region1" because it violates scope restrictions.
    Are you sure you want to use component "/oracle/apps/xdo/12.0.0/mds/oa/common/webui/DocumentViewerRn.MainRegion"?
    Validation Error:
    The value "oracle/apps/xdo/12.0.0/mds/oa/common/webui/DocumentViewerRn.MainRegion"
    set on the "Extends" property for component
    "/xx/oracle/apps/xxbsk/payslip/webui/PaySlipViewPG" contains multiple naming separators.
    I am trying to develop this page for R12.1.3 and using correct version of JDev (Patch 9879989).
    I am following the below link for embedding the XML PO into my page:
    http://oracle-hack.blogspot.co.uk/2012/04/launching-xml-publisher-from-oa.html
    Could you please help why I am getting error while extending region.
    Thank you,
    Ramu

    Hi. Could you please tell me how did you make it work. I read and try the same document at ttp://oracle-hack.blogspot.co.uk/2012/04/launching-xml-publisher-from-oa.html
    But I got null point exception at one of xdo package which is Oracles own class. I think something is wrong or forgotten in this document.
    Berkay

  • XML Publisher Report Output from OAF Page

    Hi,
    I created a button in a OAF page, and called the XML publisher Report program on click of this button. The concurrent request was ran when check from View Requests. When I click on viewout, the pdf document was open with the option, open, save, cancel. But this is not coming up in the OAF page. when debugged the code, the url is null.
    Please see the below code.
    OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)paramOAPageContext.getRootApplicationModule().getOADBTransaction();
    String s1 = oadbtransactionimpl.getAppsContext().getEnvStore().getEnv("TWO_TASK");
    System.out.println("s1 = " + s1);
    String s2 = oadbtransactionimpl.getAppsContext().getEnvStore().getEnv("GWYUID");
    System.out.println("s2 = " + s2);
    String s3 = "BEGIN :1 := fnd_webfile.get_url(fnd_webfile.request_out, :2, :3, :4, 2); end;";
    CallableStatement callablestatement = paramOAPageContext.getApplicationModule(paramOAWebBean).getOADBTransaction().createCallableStatement(s3, 1);
    System.out.println("s3 = " + s3);
    if(requestId != 0)
    try
    Number number = new Number(requestId);
    callablestatement.registerOutParameter(1, 12);
    callablestatement.setInt(2, number.intValue());
    callablestatement.setString(3, s2);
    callablestatement.setString(4, s1);
    callablestatement.execute();
    String s4 = callablestatement.getString(1);
    System.out.println("Before S4 if statement");
    if(s4 == null || s4.equals(""))
    // throw new RuntimeException();
    System.out.println("URL is null");
    System.out.println(" print ouput url - " + s4 );
    // throw OAException.wrapperException(exception);
    oadbtransactionimpl.putValue("OutputURL", s4);
    System.out.println(" print ouput url - " + s4 );
    }

    Look at the links AJ gave.
    Basically what you will do is create a Data Definition and assign a Data Template to it. Create a (document) Template and assign it to your data definition. You will use the XML Publisher Java API classes to pass parameters to your data template and extract the XML data. Then you will use this in conjunction with your document template and the OAF integration region to present the final output to the user.
    All of these things are in the XML Publisher documentation and Javadocs.

  • Problem in XML Publisher Report submission from OAF Pages

    Hi,
    I am trying to submit Concurrent Program from OAF Page which is an XML Publisher Report.
    The request is Submitting and Completing successfully but when we open to view the out put we are able to view the HTML tags.
    We checked the same Concurrent program by submitting from the SRS window After completing if we click on view output the rtf file is getting opened correctly.
    I tested with normal rdf report it is working fine with standard Concurrent program used in OAF
    So my doubt is
    Does the Standard Concurrent program used in OAF supports the rtf reports.
    Please suggest if any modifications to be done in the Concurrent program
    Krishna

    Krishna
    Modified your code a little bit.Use this
        public int submitCPRequest(String shipmentId) {
        System.out.println("into submitCPRequest");
            OAPageContext pageContext;
            OAWebBean webBean;
        try {
    OAApplicationModule am =pageContext.getApplicationModule(webBean);
        OADBTransaction tx = (OADBTransaction)am.getOADBTransaction();
        java.sql.Connection pConncection = tx.getJdbcConnection();
        ConcurrentRequest cr = new ConcurrentRequest(pConncection);
        String applnName = new String("XXAPL"); //Application that contains the concurrent program
        System.out.println("ApplName"+ applnName);
        String cpName = new String("XXAPLPOSMPRD"); //Concurrent program name
        System.out.println("Concc Name"+ cpName);
        String cpDesc = new String(" APL PO Shipping Material Pickup Request"); // concurrent Program description
        // Pass the Arguments using vector
        // Here i have added my parameter headerId to the vector and passed the
        //vector to the concurrent program
        Vector cpArgs = new Vector();
        cpArgs.addElement(shipmentId);
        System.out.println("Args"+ cpArgs);
        // Calling the Concurrent Program
        int requestId = cr.submitRequest(applnName, cpName,cpDesc, null, false, cpArgs);
        cr.addLayout("XXAPL", "XXAPLPOSMPRT", "ENG", "US" , "RTF");
        System.out.println("Req Id"+ requestId);
        tx.commit();
        return requestId;
            catch (RequestSubmissionException e) {
            System.out.println("Into Exception");
            OAException oe = new OAException(e.getMessage());
            oe.setApplicationModule(this);
            throw oe;
            catch(Exception exception)
            throw OAException.wrapperException(exception);
        }Thanks
    AJ

  • Send an email to a mail box when generate a xml publisher report in R12

    Dears,
    I faced a tough problem about xml publisher, there is a user's requirement, they want to send an email to a common mail box after user run the xml publisher report in EBS R12 instance, and they can check the report in mail box, I have not met any reuqirement like this before, so anybody has the experience about this? and please kindly share it with me, thanks a lot.
    It seems I need upload the rtf file or xml file to a directory and then system will send the mail automaticlly, but I do not know the detail information.
    Best Regards
    Spark

    Hi Spark;
    Please check below thread which could be helpful for your issue:
    Concurrent Request Output via email
    Re: concurrent ouput to email
    Regard
    Helios

  • My xml publisher report not display chart/graph in r12 apps

    dear all
    my xml publisher report is not showing chart/graph in oracle apps r12.1.1, but it's locally preview fine in MS word
    when i register rtf template in apps it just show data in xml not apply template without chart/graph it's work fine in apps
    please guide me.
    thanks
    Adnan zafar goraya

    Hello Adnan,
    To have the XML Publisher graphs display when started from Concurrent request, the DISPLAY environment variable must be specified.
    Please review the following Note on how to setup the Xserver
    Configuring VNC Or XVFB As The X Server For Applications 11i (Doc ID 181244.1)
    After this is done, you can run once again the concurrent program and check the output.
    Bogdan

  • R12 XML Publisher reports shows output but with warning

    R12 XML Publisher reports shows correct output in both PDF and EXCEL but with warning, this is making the business uneasy, can any one help me with this.
    Please advise?

    Hi santark
    Please check [this search|http://forums.oracle.com/forums/search.jspa?threadID=&q=%22OPP+Response+Timeout+to%22&objID=c84&dateRange=all&userID=&numResults=15] this topic discussed before
    Regard
    Helios

  • XML Publisher report to view as a self service page in EBS R12

    Hi All,
    I would like to show my XML publisher report as a self service page. What are the different methods in which i can show these reports. I would like to just click the function of the responsibility and see the report as a page.
    Your suggestions would be appreciable. Thanks in advance.
    Regards,
    Boris

    Hi All,
    I would like to show my XML publisher report as a self service page. What are the different methods in which i can show these reports. I would like to just click the function of the responsibility and see the report as a page.
    Your suggestions would be appreciable. Thanks in advance.
    Regards,
    Boris

  • Need help in Multi language XML Publisher report

    Hi Experts,
    I am working in EBS R12, database 10g.
    I am have a requirement to develop the multilanuge XML Publisher report.
    Details i have till now:
    query in report builder: select * from emp;
    RTF: created RTF(test_rtf)
    Datadefinition: test_dd
    Template:test_t (Language:English, terittory:US, uploaded the RTF)
    Requirement: I need the output in English and German Language.
    For French language, how to proceed further.... Could somebody help me with procedure to get it.
    Do i need to create any RTF and Template for FRENCH language.
    Kindly help me with procedure to be followed.
    Thanks in advance.

    Hi Experts,
    I have below procedure to achieve this but still not able to print output in desired language.
    1. created rtf
    2. created data definition (dd)
    3. created template (tt) [language-english, terittory-US, translatable].
    4. Exported the translated file(.xlf file) to local system
    5. In .xlf file, changed the target language to 'fr-FR' (I want to print in french)
    6. It was successfull done and status is complete
    Through SRS window, i submitted the program...but it's still showing output in english only not in french.
    Note:At SRS window, it's showing only ENGLISH LANGUAGE.
    Am i missing anything....How to show desired languages at SRS WINDOW.
    Could somebody help me how to print data in FRENCH language.
    I hope that i can get the solution from this forum.
    Thanks in advance.

Maybe you are looking for

  • Is there a way to display the legend for a chart, but not the chart?

    Hi, I have a stacked column chart and a line chart on top of each other.   I can't use the legend for the stacked column chart because the data will change from month to month, and the 2 charts will not be aligned.  I copied the stacked column chart

  • Can ATG 10.0.3 run on windows 7 enterprise edition of OS ?

    Hi guys, I'm having some trouble with ATG, when i try to run atg CRS demo in windows 7 ent edition i get these errors. i'm thinking this is not starting some of nucleus in my PC. When i tried it on a Windows Server OS, it started normaly. (i mean wit

  • Freight on Down Payment Docs

    Hi All, There is a client requirement to pay 100% adavance along with freight charges applicable against a PO .We can enter the freight details in the PO but the same is not available in A/P invoice. How do we handle this scenario ? Thanks, Asap

  • Case Statement with Group By

    Hello, I am trying to build a query that returns the 3 months of a quarter. Below are the two case statements that I am trying to use. I am getting a "Not a group by expression" in the first case statement, and a "nota a single-group group function i

  • Plain HTTP post connections

    HI, Is there any way to limit HTTP posting connections? I know I can limit SAP max conn. in transaction SMQS, but is there any way limiting plain HTTP post? Now XI is posting XML messages with speed that receiver cannot handle...