This discussion is archived
8 Replies Latest reply: Nov 25, 2012 10:43 PM by 831077 RSS

How to call reports 11g report from forms 11g?

831077 Newbie
Currently Being Moderated
Hi,


Can any one please help me on below process.

Migrate reports 6i to reports 11g ?

After migration what are the steps that involved to call that report from forms 11g?



Thanks,
Kalpana.
  • 1. Re: How to call reports 11g report from forms 11g?
    ck Explorer
    Currently Being Moderated
    hello,

    you can search the forum about this.
    just recompile and save the report to 11g.

    anyway i you give a hint.calling from 6i c/s report is diffirent in 11g web forms after migration.

    since its 11g, it is recomended that use RUN_REPORT_OBJECT

    1. in the form you create one report in the IDE tree say report1.
    2. then put this sample code to your button trigger (example only.modify it).
    3. be sure your report server is running and you can call it. please read the document from oracle how to deploy.

    declare  
       v_rep VARCHAR2(100);
       v_report_server VARCHAR2 (30) := 'rep_appserv_oracleas3';
       v_report_name VARCHAR2(100);-- := 'c:\ceor\ceor001r';
        v_format VARCHAR2(12) := 'PDF'; PDF or SPREADSHEET
        --v_format VARCHAR2(12) := 'SPREADSHEET';
       v_format VARCHAR2(12) := 'htmlcss';

       repid REPORT_OBJECT;
       rep_status VARCHAR2(100);

    --v_ip varchar2(100) := get_ip_address;

    begin
         
              
         
    repid := find_report_object('report1');

        SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_report_server);
                 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
       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;
    charles
  • 2. Re: How to call reports 11g report from forms 11g?
    831077 Newbie
    Currently Being Moderated
    Hi charles,

    Sorry for the late reply.Thank you so much for the information.I will follow the steps given.

    Thank you..


    Kalpana.
  • 3. Re: How to call reports 11g report from forms 11g?
    831077 Newbie
    Currently Being Moderated
    Hi charles,

    When i run report from forms it is opening fine.After opening reports file forms are crashed and i am not able to run any form after that until i restart the server.

    I am using below url to show report outfile.I verified it looks forms and reports are using same port number.

    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1),'_blank');

    In the steps you have given you mentioned one variable "v_ip".What is this v_ip?

    could you please help me on this.

    Thanks in advance..


    Kalpana
  • 4. Re: How to call reports 11g report from forms 11g?
    ck Explorer
    Currently Being Moderated
    hello,

    Please give your exact version of forms 11g .You can find it in your IDE help menu about forms.

    v_ip variable I used this for storing the public IP when I deployed our forms to Internet, outside our Local network or in our VPN.

    replace with your application sever name or its IP address.

    deployment mode:
    WEB.SHOW_DOCUMENT('http://your_application_servername:port#/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    production mode:
    WEB.SHOW_DOCUMENT('http://local-host:7001/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank'); //* (local-host or yourcomputername)*//




    This case below is for Forms [64 Bit] Version 11.1.2.0.0 (Production). its the same also in 32bit.

    well are you using deployment mode? or production mode?

    If deployment mode it will cause you this error when toggling between forms and report it will hang the whole process , Because the installer gives you the wrong version. If you have oracle support then you can download the patch for this.

    Are you using PORT :8888? HTTP server?

    please give some more info or answer this question then i can help you with your case.

    charles.
  • 5. Re: How to call reports 11g report from forms 11g?
    831077 Newbie
    Currently Being Moderated
    Hi charles,
    Thank you for the quick response.

    I am using forms 11.2.0.1.0(64 bit) and i am working in production mode.

    To Run forms i am using port 8888.

    Report server is running on port:9002

    It shows report server information running mode is In-Process.

    when i use local-host:7001 in web_show.document it displays " internet explorer cannot display this page".If i use compute name:7001 it displays :error:404 not found".

    Could you please help me on this.

    Thanks in advance.

    Kalpana.

    Edited by: kalpana on Nov 20, 2012 1:25 PM

    Edited by: kalpana on Nov 20, 2012 1:32 PM
  • 6. Re: How to call reports 11g report from forms 11g?
    ck Explorer
    Currently Being Moderated
    hello,

    use port 9002 to call the report.
    try this to check report server is running and you call it.

    http://local-host:9002/reports/rwservlet/showenv

    This is my mistaked when give you 7001 which forms port.
  • 7. Re: How to call reports 11g report from forms 11g?
    831077 Newbie
    Currently Being Moderated
    Thank you for the information.

    Still i am facing the same issue.I have verified report server by using "showenv".It displayed all the information about environment variables.

    Verified reports execution by using below url.It looks fine.

    http://hostname:9002/reports/rwservlet?destype=CACHE&desformat=PDF&report=C:\reports\test\test.rdf&userid=***/****@*****

    I followed below steps to call reports from forms.

    -Created Reports object with name "MY_REPORT" in forms.then added below logic in button trigger.

    DECLARE
    v_rep VARCHAR2(100);
    v_report_name VARCHAR2(100) := 'C:\reports\test.rdf';
    v_format VARCHAR2(12) := 'PDF'; -- PDF or SPREADSHEET
    rep_server_name VARCHAR2(100);
    repid REPORT_OBJECT;
    rep_status VARCHAR2(100);
    BEGIN
    tool_env.getvar('REP_SERVER',rep_server_name);
    repid := find_report_object('MY_REPORT');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT, v_format);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,v_report_name);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,rep_server_name);
    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
    MESSAGE('report executed successfully'||rep_status);
    WEB.SHOW_DOCUMENT('http://host:9002/reports/rwservlet/getjobid'||SUBSTR(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    ELSE
    MESSAGE('Error when running report - '||rep_status);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    MESSAGE(sqlerrm);
    END;
  • 8. Re: How to call reports 11g report from forms 11g?
    831077 Newbie
    Currently Being Moderated
    Issue is resolved.i have Followed the steps in below link.

    Re: FRM-92103: A network error or server failure has occurred.

    Thank you somuch for your time.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points