XML Publisher - Page Hangs on clicking export button

Hi,
I have a requirement to open a pdf file from xml publisher report on click of a button. I captured the event of the submitButton and wrote the code as follows:
if("Event.Submit".equals(s1)){
OAApplicationModule am = (OAApplicationModule)pageContext.getRootApplicationModule().findApplicationModule("XXAM");
XMLNode xmlNode = (XMLNode)am.invokeMethod("getQuoteDataXML");
// 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=ABC.pdf";
response.setHeader("Content-Disposition",contentDisposition);
response.setContentType("application/pdf");
// Get the Data XML File as the XMLNode
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(),
"ASO",
templateCode,
((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); // I'm not sure why, but found something similar online
The download window opens properly. But, the mouse icon is changed to hourglass and I cannot click on anything. I have to move to any other window in my system and comeback to this page to click on the save button. Also, once the file is downloaded I cannot click on anything on that page. I have to use browser back button to go back to previous page.
Really appreciate any help to solve this issue.
Thanks,
Bharath

Reetesh,
No, this is not completely custom development. I have to invoke a custom report from a seeded page. And there happens to be button bean on it.
If u look at the code above, I'm already trying to capture a fireAction event (Event.Submit) and trying to launch the report. But it doesnt work.
Please let me know of any other suggestions you have to make this work.
Thanks,
Bharath

Similar Messages

  • XML publisher - page number not displaying

    Hi,
    I am creating a report using xml publisher rtf template ,The result is being displayed in a table if the no of rows are more the table may extend to several pages, I want to display page numbers like 1 of 5 on First page,2 of 5 on 2nd page and so on, also is it possible that the table headers are repeated on next page?
    Thanks in advance....

    Hi,
    Use <?start:body?> for defining your header and it will repeat on every page.
    Also add <?end body?> as closing, for footer logic.
    BR
    Magnus

  • XML Publisher - Page Wise Total

    We are facing problem in incorporating ‘Page Wise Total’ in Invoice Report - Invoices print at format CAP_ETA for Germany. It an XML Report and its output appear in PDF format. As per the new requirement sent by L1 team, we are required to make changes in RTF, to show ‘Page Wise Total’.
    We have worked on this enhancement but unable to display ‘Page Wise Total’. We are able to display Sum Total of all the records appeared in three different blocks of records for that particular page at the end of the footer of Page, but not yet able to SUM UP total of these three Sum Total of three different blocks on that particular page.
    For e.g. First page of my XML Report display three different Block of data as shown below with Subtotal of 38,600.00, 4,453.47 for 1st and 2nd Block respectively, but 3rd block records appeared partially on the first page and remaining appeared on the next page. So My Report should display ‘Page Wise Total’ or ‘Amount Forward’ as 52853.47, which sholud be carried forward to next page as ‘Amount Forward’ - 52853.47. The next page/second page will dispaly the remaing line records of the 3rd block and Subtotal( Please see attachment New_Layout_Invoice_TUM_English.doc)
    Name Description Unit Quantity Price Amount in Euro
    Rösner Fees Day 17.00 1,400.00 23,800.00
    Schreiber, Clemens Fees Day 2.00 1,400.00 2,800.00
    Slegers, Arnd Fees Day 4.00 1,400.00 5,500.00
    Weiler, Andreas Fees Day 4.00 1,400.00 6,400.00
    Subtotal: 27.00 38,600.00
    Römer, Michael Expenses 2,253.79
    Schreiber, Clemens Expenses 157.69
    Slegers, Arnd Expenses 519.78
    Weiler, Andreas Expenses 1,522.21
    Subtotal: 4,453.47
    Rösner, Michael Travel expenses 2,400.00
    Schreiber, Clemens Travel expenses 2,000.00
    Siegers, Arndt Travel expenses 1,800.00
    Weiler, Andreas Travel expenses 2,000.00
    Marek, Gruchala Travel expenses 1,600.00
    Amount forward 52853.47
    As mentioned above we are able to show independently three different Page Wise Total of each of these blocks by using syntax:
    <?add-page-total:block1amount;’L_AMOUNT’?>, this syntax is used to sum up all the line records appeared in a block for a particular page and
    <?show-page-total: block1amount;’#####.##0,000’;’ ###.##0,000)’?> is used to display the Sum Total calculated by above syntax.
    But we are not able to further sum up all these Page Wise Total of different blocks.
    Please find attached copy of RTF file from Production (V18_CAR253E1), copy of RTF (V18_CAR253E1_TEST Where we are testing these new changes) and .out XML output file.
    I need help on this issue
    Thanks & Regards,
    Praveen S Negi
    [email protected]
    91-09930799325

    Hi Praveen,
    You got the solution for page total in Invoice Report in XML publisher report.
    Can you pls help regarding the same, i want to display total amount in the invoice report.
    Thanks in advance,
    Sunny

  • Firefox is my default browser, however i am not thinking of switching because it is having problems with button links on web pages, when i click a button it brings me to a white page on mozilla

    an example of a page gone wrong...
    http://ops.theladders.com/job/alert?et_id=1884492595&cr=2546606&alert=4675965?sign=y&thumbingJobList=2546229,2546638,2545219,2546565,2545967,2546784,2546606,2546513,2549099,2550891&link_id=176
    this is a link to a job site however it is impossible to get to it because when you hit apply in foxfire it brings up a blank screen (i can't give you the address because it just brings up a box without an address screen)
    it should bring up this link http://ops.theladders.com/viewExternalJob?jobId=2546606

    Have you submitted the hint button issue to the site for comment?
    It is hard to debug script problems without access to the page... If you want to research it yourself, start by opening the Error Console (Tools menu) and clicking the Clear button. Then reload the page and check the Console for any errors (red icon). These can indicate when scripts are not loading correctly. Then try to click the hint button and see whether that triggers any additional errors.
    The error messages generally are most useful to the page's programmer, but sometimes can reveal enough information to create a user solution (e.g., running a script through the GreaseMonkey extension that repairs the problem).

  • Firefox in Mac OS X opens home page twice when clicking 'home' button

    Using Firefox 3.6.3 on Mac OS X 10.6.3
    When clicking on 'Home' button in the browser, the home page loads in the current tab, but Firefox also opens a new tab and opens the home page there too.
    Not disastrous, but quite irritating.
    == This happened ==
    Every time Firefox opened
    == From 1st use

    It could just be that the home page setting was accidentally changed to this. Firefox can be set to have multiple tabs open as the home page. Try resetting your home page - [[How to set the home page]].

  • Adobe form integrated with WDA Application- hanging on click of button

    Hello Experts,
    These are my specifications -
    SAP Netweaver release - 701 Level -05
    ADS Version - 802.20090618120017.572641
    Version of ZCI script - 802.20090115091137.519569.519537
    When I click on the submit button, the wait symbol ( a circle) keeps on coming and then after 600 secs, a connection time out occurs. We have applied note 1223121 to our system and this dint help.
    I have looked at the other posts in this forums too, however dint get much help. Please advise how to proceed. We are running out of ideas here.
    Appreciate your help! Thanks
    Regards, Liz

    Hi Ralf,
    Thanks for your reply. I was able to get the trace file. These are my observations -
    I got the foll. entries - Got a message from Adobe "Got a message from Adobe Reader: zciVersion 1: 800....". Also Entries containing "sendDataToServer" and "responseFromServer" are also present.
    The only error I could see is in the last line -
    16:45:33.892 EventHandler.js(285) : onXmlHttpResponse : Delta response could not be loaded.
    Another thing to note is the repeated occurance of the foll. statements in the end-
    16:42:34.670 BrowserWindow.js(431) : onfocusin : Focus
    16:42:35.045 BrowserWindow.js(478) : checkForLostFocus : Blur
    16:42:35.045 BrowserWindow.js(488) : checkForLostFocus : fire lsfocuslost
    16:43:28.719 BrowserWindow.js(431) : onfocusin : Focus
    16:43:29.923 BrowserWindow.js(478) : checkForLostFocus : Blur
    16:43:29.939 BrowserWindow.js(488) : checkForLostFocus : fire lsfocuslost
    16:44:13.935 BrowserWindow.js(431) : onfocusin : Focus
    16:44:15.827 BrowserWindow.js(478) : checkForLostFocus : Blur
    16:44:15.874 BrowserWindow.js(488) : checkForLostFocus : fire lsfocuslost
    I was wondering if you have encountered any issue like this.
    Hi Chris,
    No I dont have the ISR controls. Its a simple button. The button lies on the View. There is no button on the form so there is no script that I can check. Hope I understood what you were saying.
    All, pls. advise if you have encountered this issue before.
    Thanks in advance. Liz

  • Adobe form hangs on click of buttons

    Hi,
    Currently i have adobe live cycle designer 8.0 and adobe reader 8.1.2.  I can view the form ,edit and enter values. But the moment , i submit the form data  using button outside the form (on wd abap appl) / or inside the form, the form just hangs.
    The same form works fine on my colleague's machine.  I have windows vista, not sure where the issue is in the installation.
    I tried installing Adobe reader 9.3.. but that doesnt open the form at all. Tried a couple of versions, but no clue. Please let me know if you have any clue.
    Thanks.
    Saujanya

    Hi Saujanya,
    This could by caused by the network, the used browser or additional browser plugins. Try to do the following:
    1. Test with an alternative browser (if you are on a SP which supports different browsers than IE, see PAM, http://service.sap.com/pam): If it works with Firefox, then you know the problem is caused by IE and not by the OS, network, ...
    2. Deactivate/uninstall all additional browser plugins/add-ons (like google toolbar, Yahoo toolbar, ...)
    3. Create a client trace as explained in SAP note 999998. Maybe there's a hint in the trace. Watch for something like "ERROR".
    4. Install a HTTP sniffer (like "fiddler") on both machines and compare the network traffic. Maybe there's a request with a 4xx HTTP status code?
    5. How is the machine connected to your network? Is it behind an additional webproxy?
    Hope one of this helps,
    Ralf

  • 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.

  • Run a function in flash when click a button on HTML page

    dear friends,
    i have loaded my swf in an html/ aspx page. when i click a button in html page, i want to pause my swf movie. Actually swf has another movie clip i want to stop that. any option pls help me. possible send me some sample coadings.. i tried with externalInterface but no result..
    or if i click a button in html page, i want to run a function existing in loaded swf....
    thanks in advance...
    Thanks and Regards,
    Syed Abdul Rahim

    Dear Mr.ned,
    Greetings! i tried to put the id also, still its not working.. any ideas? find below my codings:
    flash code:
    import flash.external.ExternalInterface;
    ExternalInterface.addCallback("methodName", method );
    function method() {
        mytxt.text = "call from java script";
        trace("called from javascript");
    HTML code:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>jscr_rd</title>
    <script language="javascript">AC_FL_RunContent = 0;</script>
    <script src="AC_RunActiveContent.js" language="javascript"></script>
    </head>
    <body bgcolor="#ffffff">
    <p>
      <!--url's used in the movie-->
      <!--text used in the movie-->
      <!--
    <p align="left"></p>
    -->
      <!-- saved from url=(0013)about:internet -->
      </script>
      <script language="javascript" type="text" >
    function methodName() {
       jscr_rd.method();
       window.alert("hi.. u clicked me?");
    </script>
      <script language="javascript">
        if (AC_FL_RunContent == 0) {
            alert("This page requires AC_RunActiveContent.js.");
        } else {
            AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','widt h','550','height','400','id','jscr_rd','align','middle','src','jscr_rd','quality','high',' bgcolor','#ffffff','name','jscr_rd','allowscriptaccess','sameDomain','allowfullscreen','fa lse','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','jscr_rd' ); //end AC code
    </script>
      <noscript>
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="jscr_rd" align="middle">
          <param name="allowScriptAccess" value="sameDomain" />
          <param name="allowFullScreen" value="false" />
          <param name="movie" value="jscr_rd.swf" />
          <param name="quality" value="high" />
          <param name="bgcolor" value="#ffffff" />   
          <embed src="jscr_rd.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="jscr_rd" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />   
      </object>
      </noscript>
    </p>
    <form name="form1" method="post" action="">
    <input name="but" type="button" value="click me" onClick="methodName()">
    </form>
    <p> </p>
    </body>
    </html>
    pls check advice me
    Thanks and Regards,
    Syed Abdul Rahim

  • Form:The user sees on the screen a single page, for the second page (and to fill it in) he will click a button "next page"!

    Hello, sorry for my english!
    I am currently creating a form. This form contains 20 pages. For more comfier to fill it in, I want it to be loaded 1 page to 1 page. The user sees on the screen a single page, for the second page (and to fill it in) he will click a button "next page"!
    Is it possible to do this with adobe acrobat pro?
    In the case of a negative answer, can Indesign do this?
    thank you.

    Technically it's possible to use a script to prevent someone from going to the next page unless they click a button, but I think it's a bad idea and very user un-friendly. You can add a button that will take someone to the next page, but don't try to restrict them from doing so themselves if they so wish.

  • Let's say I'm in my email, and I double click the button to the left of the screen and it then shows the multiple screens I've looked at already. How do I clear those already seen pages?

    If I'm in my email acct, I click a hyperlink to another page and then to go back to my email page, I double click the button to the left of the screen and it shows a slide list of pages I have recently been to. How do I get rid of that? Or clear the pages?

    You mean the multi task bar at the bottom?  In iOS7 there is a big preview box above each app in the bar.  Just swipe it up and away.

  • Show Top of the Page after Click Save button

    Hi all,
     i have requirement i want show top of the page after click of save button.if you know answer please give reply.
    Regards
    VeerendraNadh

    Hi,
    Would you mind providing more details(screenshot would be better) about your requirement? It would make others easier to find a solution for you.
    Suppose that there is a scenario like this: Edit a page, when content grows too large, page will scroll to the bottom of the page. When clicking “Save” button in the
    ribbon, by default, page will scroll to the top just like it is first loaded in the browser.
    Feel free to reply if this is not what you really mean.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Error while trying to update the XML template using XML Publisher Administrator

    Hello Folks,
    We are on R12.1.3
    I changed a condition in a report and trying to upload the new XML template using XML Publisher Administrator.
    when i click the Apply button, it is throwing an error 'Bad Request'
    Navigation : XML Publisher Administrator > Data Definitions > query the report
    Click on the name of the report > click 'Update file' besides Data Template > Choose file > Click Apply
    I am getting the below error
    Bad Request
    Your browser sent a request that this server could not understand.
    Now, i could not upload a new XML template.
    Am I doing anything wrong.
    regards,
    Kris

    user10163762 wrote:
    Thank you Eugen and Hussein.
    The problem is not with the template.
    It seems to be a problem in that particular instance.
    Uploaded it in a different instance.
    However once i run the program, i cannot view the output as the browser window flashes and disappears.
    My colleague says , it is to do with the trusted site to download something from the browser.
    Can you please guide me on how to fix this ?
    http://bit.ly/1k8e2vi
    Thanks,
    Hussein

  • How to invoke XML publisher report from APPS 11i forms

    I have a requirement in oracle application forms menu where I need to call the XML publisher report when user clicks the menu item.
    I am using following two API's
    fnd_request.add_layout
    fnd_request.submit_request
    But I am getting the error message
    java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA.......
    your help is truly appreciated.
    Thanks
    Siva

    I have registered the report using admin responsibility and ran the reprt form SRS and completed successfully. Eeven from the forms it is submitting the request but the request completed as warning with above message. I can see the out put by clicking the View XML button but it unable to publish output.
    Thanks guru your quick response.
    Thanks
    siva

  • Page headers are not exported to excel files - Is there a workaround?

    I use 2008, SP3.
    I am experiencing a problem with exporting to Excel(.xls): the page headers, but the very first, are not exported.
    The report page headers consist of weekdays and the corresponding dates, meanning they are different on each page.
    The report looks OK in pdf and doc formats.
    Is this a known problem or limitation?
    Is there is a way to controll the export to Excel to correct this problem?
    Thanks and ragards
    Israel M Brill, Analyst

    hi,
    Are you exporting from Crystal Report Designer or InfoView?
    If you are exporting from CR Designer, follow the below steps.
    - Click Export button
    - Microsoft Excel (97-2003) , OK
    - 'Excel Format Options' dialog box appears
    - Export Page Headers and Page Footers -> On Each Page, OK
    Regards,
    Vamsee

Maybe you are looking for

  • Voice memos disappear off iphone 4 & ipod nano 5th after syncing to mac

    hi. i record voice memos on my ipod nano 5th gen and when i sync the nano to my mac they are in itunes on my mac but not on my ipod anymore. they completely disappear from the nano. there is a v.m. playlist i can see on itunes for the ipod but they a

  • Some mp3s no longer play in itunes 6

    ok this one has me stumped. upgaded my itunes and now some of my music wont play (when it did before). first thing i noticed is that some music icons were changed to quicktime. these would not play even when changing back to itunes (by selecting "ope

  • Account number range in EBS

    Hi ,    When do EBS configuration we need to assign account symbol to GL accounts. My question is when ++++++++++ is populated in GL account field for Bank Deposit symbol what is the account number range for '+++++++++'. Namely,  which accounts will

  • Query Showing BP Properties

    Hello All - We would like a query that shows only the BP Accounts with BP Property #2 selected.  In this query, we would like to show the status (Y or N) of BP Properties 3-12.  Can anyone help with this? Thanks, Mike

  • What is the file name of the Adobe 9 Standard update - 9.2.0?

    As IT support for a large organization I need to update multiple PCs with Adobe 9 Standard. I'd like to download the 9.2.0 (Standard) update once rather than on each machine. Thank you