WEB.SHOW_DOCUMENT suppressing browser

Hi,
I want print a report by using the WEB.SHOW_DOCUMENT and without invoking the browser, so that it should directly print ot the printer
Any Suggestion will be appreciated
Regards

You could have a look at ORARRP at http://www.oracle.com/technology/sample_code/products/reports/index.html or a JavaBean based solution at Forms-Reports Web : Direct print a file to a local printer

Similar Messages

  • WEB.show_document in Browser Tab Pages

    Hi
    This problem occurs in IE7 which makes use of tab pages on the web browser. I'm using forms 10g, web.show_document(v_url, '_BLANK') to pop up a browser window in IE to display a PDF file residing on the App Server.
    The new browser window pops up in IE and displays the pdf document fine. The window title and address bar contain the correct url (a rather long one). The problem I have is that the browser tab page is labelled "Error" which immediately causes concerns amongst the users. I'm not sure if it does this because it does not know what to label the tab page or if the URL is perhaps too long.
    Is there any way to rename / relabel the tab page or set the name or alias somewhere? I'll appreciate any advice on the issue...
    Regards
    Mario

    Hi,
    With web.show_document() you could call a html page that call your php page with POST().
    Francois

  • [Solved] Problem with Web.show_document

    Hi all,
    In the custom.pll I use a Web.show_document() to get a file from the server.
    The URL is for example "http://10.0.0.20/test/159083.apn"
    I tested this and the browser (IE) is opening this file as a text file.
    Now I want that the .apn file must be opened with a specific program. So I added .apn to the registry.
    I typed manually http://10.0.0.20/test/159083.apn in the browser and the program I prefer is starting up now.
    But if the custom.pll executes the Web.show_document() now in a split second I see a flash of a screen and that screen is closed again. I don't know what screen but I think it is the browser.
    After that nothing happens anymore.
    Does someone here has any idea of what is going wrong

    Solved it.
    It's a browser security issue.
    In the custom security settings "Automatic prompting for file downloads" must be enabled.
    If this is disabled you normal get the yellow warning bar. But with Web.show_document() the browser opens and closes very fast.

  • Web.show_document-i dont want to open report in browser just save in folder

    Hi all,
    I m using the following code for pdf file generation using a loop. The problem is every report is open in browser and then save a pdf file in a specific folder. I want that report is not open into browser just save pdf files in a specific folder. Any body knows how i do this. I am using 10g developer 9.0.4.
    DECLARE
         v_SAM_CUST_ID     NUMBER(22);
         CURSOR C1 IS  SELECT
         SAM_CUST_ID
         FROM SAM ,DE_ADDR
         WHERE SAM.SAM_CUST_ID=DE_ADDR.DE_CUST_ID
         AND SAM.SAM_FREQUENCY IN ('DAILY','MONTHLY','Quarterly','Half yearly','Yearly');
    BEGIN
           if :TEXT_BOX1='S' then
           OPEN C1;
           LOOP
           FETCH C1 INTO v_SAM_CUST_ID;
           EXIT WHEN C1%NOTFOUND;
           --message('You have enter S'||v_SAM_CUST_ID);
           WEB.SHOW_DOCUMENT('http://plato:8889/reports/rwservlet?report=C:\CUST_PRINT1.rdf&P_1='||v_SAM_CUST_ID||'&cust_id&desformat=pdf&destype=cache&userid=wh1/wh1@dwh');
           END LOOP;
           CLOSE C1;
       END IF;
    END;
         

    This configuration file is present in the /reports/conf/ directory.
    It contains a few examples, very usefull if you want to hide some informaztion, like the connection string for instance.
    you can call it by setting the entry name in the url:
    http://machine.fr:7778/reports/rwservlet?my_entry&report=report.rdf&destype=...
    Francois

  • Closing the browser windows created by web.show_document and javascript

    From Forms I am issuing a http request using web.show_document and javascript:window.open(). The http request makes a remote procedure call to a coldfusion component on a JRun appserver. I want this rpc to fire in the background so that the current forms browser window remains as is.
    The logic is as follows
    l_rpcURL := 'http://....just a standard URL.....'; -- edited for this thread
    l_jsURL := 'javascript:window.open("' || l_rpcURL || '","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=no");self.close();';
    WEB.SHOW_DOCUMENT (l_jsURL,'_blank');
    The http request works fine but leaves a browser window behind. It's the one created by the javascript.window.open(). If I remove the self.close() from the javascript then I have two browser windows open, one from web.show_document and the other, as described previously, from the window.open().
    Any idea how I can force closure of the window opened by the window.open() ?
    Thanks

    Hi,
    did this occured afer installing service pack 2?
    A work around is The only solution that is to create a close.html file and calling this file in the code: Web.show_document('http://server:port/close.html','_self');
    <html>
    <body onload="closeit()">
    <script>
    window.close();
    </script>
    </body>
    </html>
    Monica

  • WEB.SHOW_DOCUMENT . Publish reports character mode directly within browser!

    hello!
    I'm having the problem.
    When I want to publish reports character mode directly within browser!
    The code is as follows!
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, RUNTIME);
      SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
      SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE,  FILE);
      SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, '');
      SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, server );
      v_rep := RUN_REPORT_OBJECT(reportFile,mparamlist_id);
      rep_status := REPORT_OBJECT_STATUS(v_rep);
         if rep_status = 'FINISHED' then
            vjob_id :=substr(v_rep,length(server)+2,length(v_rep));
      WEB.SHOW_DOCUMENT('../reports/rwservlet/getjobid'||vjob_id||'?server='||server,'_blank');
         else
      message('Fail to create Report!');
         end if;
    The report is generated,
    But it does not open directly in browser!
    The browser will download a file without extension / format, with the name 'getjobid38'!
    When I change the code to 'TXT'
    WEB.SHOW_DOCUMENT('../reports/rwservlet/getjobid'||vjob_id||'.txt?server='||servidor,'_blank');
    The following error is returned:
    rep-50003 the command line is invalid: getjobid38.txt
    Already grateful!

    working with forms 11gR2 (11.1.2.1)

  • WEB.SHOW_DOCUMENT opens additiional IE browser.

    Hi All,
    I am using web.show_document (web.show_document('file:///file_name','_blank') ) to open pdf and msg files stored at a location. For PDF files, web.show_document works fine and pdf file gets open. However for msg (email) files, a new browser gets open along with msg file. User need to close this additional browser.
    Also the word files opens in IE browser. We need not to open MS office files in IE browser.
    Any suggestions to overcome this issue.
    Regards,
    Vinit
    Edited by: Vinit on Feb 21, 2011 2:37 AM

    Vinit,
    Your code explicetly opens a new "Blank" browser window. The reason the new browser window goes away with the .pdf files is because you have an OS MIME association for .pdf's which controls how the file is opened on the OS. Clearly, there is no MIME association for the other file types.
    web.show_document (web.show_document('file:///file_name','_blank') )Try '_self' or '_parent' in place of '_blank'. For more information on the Web.Show_Document built-in please check the Forms Help system.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Feb 22, 2011 1:11 PM

  • Show a blob( pdf ) from db-table  in the clients browser/ web.show_document

    my env:
    Database R11_2 on one windows-host-machine
    AS 10 g on another windows-host-machine
    I can show files in Forms10g from inside the AS with web.show_document,
    that works fine
    but now I want to show a ( pdf or text ) File from a BLOB in a Table inside in the Database
    to the Browser running in Forms on AS,
    I do not want to create a extra Form for this reason, but want to show it in browser - windows
    ( how ) can I use web.show_document against a URL on the Database R11 ?
    what other tool , java ?
    regards

    Easiest way is probably to use mod_plsql and wpg_docload.download_file. If you retrieve the blob content from some table, than you can show it with a generic procedure like:
    procedure show_webdoc(io_blob          in out nocopy blob
                         ,i_mimetype       in varchar2
                         ,i_filename       in varchar2)
    is
    begin
       if dbms_lob.getlength(io_blob) >0 then
          owa_util.mime_header(nvl(i_mimetype,'application/octet'),false);
          htp.p('Content-length: ' || dbms_lob.getlength(io_blob));
          htp.p('Content-Disposition:  attachment; filename="'||i_filename|| '"');
          owa_util.http_header_close;
          wpg_docload.download_file(io_blob);
       end if;
    end show_webdoc;

  • Browser Time out in Reports (using WEB.SHOW_DOCUMENT to call reports)

    When running a big report which takes a long time to run, it finishes on the report server but in the browser the screen is stuck at the parameter form, you don't see the report output. It's as if the browser has timedout. Is there a solution to this?
    I am running reports using WEB.SHOW_DOCUMENT only - through a URL. This seems to be a huge drawback of using this method.

    Is the browser launching?
    If it is have you tried a show source on the browser window?
    Sometimes if you open an XML file in a browser you get a blank page but the XML is there. Something to do with the XML format I think. I'm no expert on XML just a behaviour I have observed.

  • Title of the browser displaying a report output through web.show_document

    Hiya
    We are using Oracle Forms 10g 10.1.2.0.2
    All our Forms and Reports are working well.
    We are using Java Script in Web.Show_Document so that when the report is displayed on the screen in the browser, the browser's toolbar and menubar should not be visible.
    The code looks like this:
    v_url_in := 'reports/rwservlet' || '/getjobid' || v_job_id || '?server='|| 'my_rep_server';
    v_url_out := 'javascript:window.open("'||v_url_in||'", " ", "toolbar=no,menubar=no");self.close();';
    Web.Show_Document (v_url_out, '_blank');
    The above code is working absolutely fine. No issues about this.
    Now when the report opens in a new browser window,the title of the browser window reads as follows:
    http://<hostname>:8889/reports/rwservlet/getjobid1234?server=my_rep_server - Microsoft Internet Explorer
    So rather than displaying the title of the browser window as the URL of our Application Server, we want to show the title to Reports name so that it
    reads as
    'Customer Sales Summary Report - Microsoft Internet Explorer'.
    Does anyone has any idea if it is possible to change the title of the browser window, if so, how ?
    Cheers
    Mayur

    Mayur,
    I'm not a web developer either, however, I've done this kind of thing using the HTP database package - as I mentioned. What you could do is write a database procedure that accepts the URL and the Title as parameters and let the procedure open the URL for you. For example:
    CREATE OR REPLACE PROCEDURE show_url(p_url VARCHAR2, p_title varchar2) AS
    BEGIN
       htp.htmlOpen;
       htp.headOpen;
       htp.htitle(p_title);
       htp.headClose;
       htp.bodyOpen( cattributes => 'onLoad="WinOpen()"');
       htp.bodyOpen;
       htp.script(clanguage => 'javascript',
                    cscript => '<!--
                                function WinOpen() { open("'||p_url||'","_self");
                                //-->'
       htp.bodyClose;
       htp.htmlClose;
    END;I was unable to test this procedure on my Oracle XE install, but it should work on a non-XE database.
    Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question, please mark the response accordingly. Thanks!

  • How to show PDF with web.show_document in a separate browser frame (forms10g)?

    I'd like to show PDF in a separate browser frame or in the same window, but at the same time with form screen. So, I'd like to have form in the left and showing pdf in the right. PDF is runing on web.show_document. I understand that this is imposible (btw: does anyone know when it's going to be posible?), but I'd like to figure out if someone have already made some kind of solution?
    Thanks.

    I'd like to show PDF in a separate browser frame or in the same window, but at the same time with form screen. So, I'd like to have form in the left and showing pdf in the right. PDF is runing on web.show_document. I understand that this is imposible (btw: does anyone know when it's going to be posible?), but I'd like to figure out if someone have already made some kind of solution?
    Thanks.

  • Web.show_document does not open browser anymore

    We upgraded our production database over the weekend from 10g to 11g. When it was still 10g, our Forms application used to open a PDF embedded in IE. After moving to 11g, it does not open IE anymore and shows no error messages. Clicking the button with the web.show_document command does nothing. Our test database is also 11g but does not have this problem. What could have gotten wrong?

    I can't explain why it seems to started failing all of a sudden. We often hear comments like this only to later discover that either someone else made changes of which you are unaware or possbily a software update occurred automatically. For example, the JRE version may have been auto-updated.
    As for recoding in an alternative fashion, it will be difficult for me to say specifically because I don't know the app nor do I know your needs. The biggest, and it isn't all that big, deal will be to identify from where the pdf being opened comes from. In other words, does it already exist on the client machine or is it downloaded to the client from the/a server? Also important to know is whether or not the file name is known or not.
    So, if you want to change the code, first figure out how you want the application to complete the task. Here are my suggestions:
    Suggestion 1.
    <blockquote>If the file (pdf in your case) originally resides on a remote server, then leave it there. The document can be opened using a direct url to the file on the remote server. For example:
    WEB.SHOW_DOCUMENT ('http://server/somepath/my.pdf','_blank');If the file lives within the Forms directories, you can even use a relative path rather than the fully qualified one above. For example, if the files live in \forms\java\foo then you can do this:
    -- The exact entry may differ slightly depending on which
    -- Forms version you are using and where you locate the files
    WEB.SHOW_DOCUMENT ('/forms/java/foo/my.pdf','_blank');This makes the application a little more flexable given that you would not need to change the app code if the server name changed. Once the file has been opened on the client side, whatever pdf reader the end-user is using will offer a "Save" option. So if they choose to save the file locally, they can do so as they desire.</blockquote>
    Suggestion 2.
    <blockquote>If, for whatever reason, the file is downloaded to the client or just happens to already exist on the client, you can use WebUtil's CLIENT_HOST (or WEBUTIL_HOST.HOST) command to open the file locally. There are several ways to do this and which method you choose will depend on a few factors. For example, are all the client machines Windows based? I will assume, for this example that the client machines are Windows based. And, because I like to write code as generically as possible, here is a way to open documents on Windows without the need to know which application normally handles it. In other words, you don't need to know that it will be Adobe Acrobat that opens pdf files or that MS Word will open doc files.
    -- In this example, the value of myPathAndFile is the path and filename.
    -- For example, myPathAndFile := 'C:\Users\<USER_NAME>\Documents\foo.pdf';
    CLIENT_HOST('rundll32 shell32,ShellExec_RunDLL '|| myPathAndFile);This is a bit of an old school way of accomplishing the task, but it is very effective and flexiable. Alternatively, you could use CLIENT_HOST to directly call the file, but this may not always work. For example:
    CLIENT_HOST('C:\Users\<USER_NAME>\Documents\foo.pdf');</blockquote>

  • Bad initial encoding of report after WEB.SHOW_DOCUMENT(MyURL,'_blank')

    Hi,
    I use Developer9iDS 9.0.2 with installed Patch1 on Win2000 with IE 6.0.
    I need an HTMLCSS report in lithuanian language and want to prewiev them in new window in browser with Baltic(Windows) encoding.
    When I produce my report with RUN_REPORT_OBJECT and parameters REPORT_DESFORMAT=HTMLCSS and REPORT_DESTYPE=CACHE
    I found, that my report is OK in cache with all needed lithuanian characters.
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1257">
    </head>
    <body dir=LTR bgcolor="#ffffff">
    </body></html>
    But when I open it with WEB.SHOW_DOCUMENT (MyURL/getjobid'||vJobId||'?server=<myserver>,'_blank');
    my browser shows it in bad encoding for first time and every time I must set encoding manualy to Baltic(Windows).
    That's will be very difficult for my users!!!
    I found in source that another one HTML document stands at the begining of my document followed by my document
    <html>
    <head>
    <base href="MyURL/reports/rwservlet/getfile/HXDcQdI8VQ/QC6Q=/58327007.htm">
    </head></html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1257">
    </head>
    <body dir=LTR bgcolor="#ffffff">
    </body></html>
    I think, that first docume[i]Long postings are being truncated to ~1 kB at this time.

    Sorry, my question was ower 1 Kb. My question is:
    I am thinking, that additional document without META may be reason for bad initial encoding.
    Am I right? How can I suppress this first document? Is there another way for solution of this problem?
    Sorry for my english. Thanks for help!
    Algis

  • WEB.SHOW_DOCUMENT sometimes doesn't display the generated PDF file

    Hi all,
    I'm using the following code to generated my report from Forms:<br><br>
    V_REPORT_ID := FIND_REPORT_OBJECT(V_REPORT_NAME);
    V_REPORT_SERVER_JOB:= RUN_REPORT_OBJECT(V_REPORT_ID,P_LIST);
        V_JOB_ID := substr(V_REPORT_SERVER_JOB,length(:GLOBAL.REPORTS_SERVER)+2,length(V_REPORT_SERVER_JOB));
        V_REPORT_STATUS := REPORT_OBJECT_STATUS(V_REPORT_SERVER_JOB);
    LOOP
       IF V_REPORT_STATUS = 'FINISHED' THEN          
          V_TMP_PDF := :GLOBAL.APACHE_HTML_FOLDER ||'rpt'|| V_JOB_ID  ||'.pdf' ;
         COPY_REPORT_OBJECT_OUTPUT(V_REPORT_SERVER_JOB, V_TMP_PDF );
        WEB.SHOW_DOCUMENT(:GLOBAL.AS_HOME_URL ||  'rpt'|| V_JOB_ID  ||'.pdf' ,'_BLANK');     
        END IF;
    END LOOP; <br><br>
    Everything works fine except the WEB.SHOW_DOCUMENT part. In some clients, this command does what it required from it and opens a new browser window with the PDF report displayed on it. In some other clients, this command does nothing: now window dispalyed. When I refer to the Application Server, I see the PDF report successfully generated there. When I put the URL of the generated report manually in the browser address, I can see the report.
    <br><br>
    <b>Why the WEB.SHOW_DOCUMENT doesn't display the generated PDF report in some clients?</b>

    I agree with the previous 2 posters.
    Also firefox and ie handle it differently. Make sure you test on what your clients use.
    Sometimes acrotray.exe is completely retarded and doesn't work.

  • WEB.SHOW_DOCUMENT

    Hello
    I used this code on form, button mouse click trigger.
    WEB.SHOW_DOCUMENT('http://<IAS_IP>:7778/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    When I clicked it open another window but it lost the port number 7778 on the URL address then it gives the error page cannot display.
    http://<IAS_IP>/reports/rwservlet/getjobid38?
    If I add the port # manuallly it will show the report.
    But the insert/import JPG picture not appear it gives red x on the left corner.
    How can i solved this problem to retain the port# when calling the report? Anyone can help me please.
    IAS10gR2. OS windows server 2003R2.
    Furthermore where i can set the path of the report so that no need to specify the drives/folder which reports resides? I set the path for forms but for report i dont know where.
    I edited the registry but the report path is not accessible.Is there any config like the forms(Forms Edit Environment File: default.env) for report?
    Thank you,
    charles

    Hello Michael
    Thank for your reply.
    Im accessing the IAS on the internet public IP.I dont have now the registered domain name. im only using the IP that the internet provider company provides.
    This my complete work code now..
    declare
    v_rep VARCHAR2(100);
    v_report_server VARCHAR2 (30) := 'rep_appserv_oracleas2';
    v_report_name VARCHAR2(100) := 'c:\ceor\ceor001r'; <<<<<---- HOW TO REMOVE THE DRIVES/FOLDER. WHERE I CAN SET THE REPORT PATH? I MODIFIED THE REGISTRY.
    v_format VARCHAR2(12) := 'PDF'; PDF or SPREADSHEET
    v_format VARCHAR2(12) := 'htmlcss';
    repid REPORT_OBJECT; --- Added
    rep_status VARCHAR2(100); ---added
    v_ip varchar2(100) := 'IAS_IP';
    begin
    repid := find_report_object('report5');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_report_server); -- remove ' '
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,v_report_name);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT, v_format);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_1='||:SP_USERCODE); 'p_my_second_parameter='||:block.my_second_parameter);
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /*Display report in the browser*/
    WEB.SHOW_DOCUMENT('http://'||v_ip||'/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    ELSE
    message('Error when running report - '||rep_status);
    END IF;
    END;
    If im not wrong your the one who corrected my code before.I need to check on older post.
    its formseleven.
    Re: security on url when calling reports on report10g
    Thank you.
    Charles.

Maybe you are looking for

  • ITunes is not letting me update to version 5.0.1?

    Yesterday I tried downloading an app from my iPhone 4 and it said that it requires iOS 4.3. I clicked the update button in iTunes (on my computer) and waited for a couple of minutes. After it was done, a messaged appeared on the screen and said, "The

  • What happen to the principle or policy that the customer is always right or does this not apply to Verizon?

    My credit card was charged the $35 restocking fee but the manager in the store never returned the handset, I took my credit card statement showing the date and store information, when I contact acted Verizon Corporate office, I was told after 3 month

  • SQL Server Protection untrusted domain

    DPM 2012 R2 on Server 2008R2 SQL Server:  2008 R2 running SQL 2008R2 in untrusted domain Configured environment as Untrusted - local User and agent is communicating with SQL Server. Configured protection group and saw all the DB's.  Initially about 1

  • Jtable printing color

    When i try to print my Jtable, everything that is gray prints as a purplish color. How do i get rid of that? One of these things is a checkbox in the cell adn the other is the table header.

  • Comical Send To issue

    I did my first Send To Color and it launched Classic, and then opened the Color control panel! Needless to say the OS 9 color control panel wasn't quite up to doing the corrections I had in mind... I tried renaming the control panel, but still it ope