2 Replies Latest reply: Mar 12, 2013 10:21 AM by Scott_Symonds RSS

    FRM-41213 when calling reports from forms 11g Rel2

    myluism
      Hi all.

      I have a forms / reports 11g rel2 developer installation on a Windows 7 box.

      I have a simple form that must pass a single parameter to a web report. I'm using the run_report_object built-in but integration is not possible due to FRM-41213.

      This is the procedure:

      procedure p_imprimir_reporte (p_report_object in varchar2
      ,p_report_server in varchar2
      ,p_nb_reporte in varchar2
      ,p_formato_reporte in varchar2) is
      --
      v_report_id report_object;
      v_tx_report_server_job varchar2(100); -- Representa el id de cada solicitud de reporte (report request)
      v_tx_status_reporte varchar2(100); -- Status de la tarea de reporte (report job)
      v_job_id varchar2(100); -- Representa el id del reporte como un string numérico
      --
      begin
      --
      v_report_id:= find_report_object(p_report_object);
      --
      -- Parámetros generales del reporte
      --
      set_report_object_property(v_report_id,REPORT_DESFORMAT,p_formato_reporte);
      set_report_object_property(v_report_id,REPORT_DESTYPE,CACHE);
      set_report_object_property(v_report_id,REPORT_COMM_MODE,SYNCHRONOUS);
      set_report_object_property(v_report_id,REPORT_SERVER,p_report_server);
      --
      -- Parámetros de usuario o específicos del reporte
      --
      set_report_object_property(v_report_id,REPORT_FILENAME,p_nb_reporte); -- Reporte a ejecutar
      set_report_object_property(v_report_id,REPORT_OTHER,'p_deptno='||:cli.id_cliente||'paramform=no');
      v_tx_report_server_job := run_report_object(v_report_id);
      v_job_id := substr(v_tx_report_server_job,instr(v_tx_report_server_job,'_',-1)+1);
      v_tx_status_reporte := report_object_status(v_tx_report_server_job);
      --
      if v_tx_status_reporte = 'FINISHED'
           then
      /* Call the Reports output to be displayed in the browser. The URL for relative addressing is valid
      only when the Reports Server resides on the same host as the Forms Server and is accessed via the same port.
      For accessing a remote Reports environment, you must use a fully qualified URL (i.e. http://hostname:port ) */
      web.show_document ('/reports/rwservlet/getjobid'|| v_job_id ||'?server='||p_report_server,'_blank');
      else
      message (' Ocurrió un error en la ejecución del reporte '||v_tx_status_reporte);
      end if;
      --
      end;

      and this is called this way:

      p_imprimir_reporte ('REPORTE'
      ,'*rep_adminserver_myluism-pc_asinst_1'*
      ,'C:\otros\10g\orden.rep'
      ,'HTML');

      I have picked up the report server name from the reports_install.properties located at $ORACLE_INSTANCE\reports directory:

      SERVER_NAME=rep_adminserver_myluism-pc_asinst_1
      REPORTS_MANAGED_WLS_HOST=myluism-PC
      FORMS_CONFIGURED=true
      ORACLE_INSTANCE_NAME=asinst_1
      REPORTS_APP_DEPLOYMENT_DIR=C\:\\Oracle\\Middleware\\user_projects\\domains\\ClassicDomain2\\servers\\AdminServer\\tmp\\_WL_user\\reports_11.1.2\\90rnjo
      INPROCESS_SERVER_NAME=rep_adminserver_myluism-pc_asinst_1

      According to Publishing Reports to the Web with Oracle Reports Services, "Before you start the Oracle Reports Server with Oracle Process Manager and Notification (OPMN), you must add the Server to OPMN"

      ORACLE_INSTANCE/bin/opmnctl createcomponent -adminUsername weblogic -adminHost <host_name> -adminPort <port> -oracleHome <oracle_home -oracleInstance <instance_home> -instanceName <instancename> -componentName <bridge_name> -componentType ReportsServerComponent

      my question is:

      Since OEM is not installed on a developer installation, do i need to create the component and start it throgh OPMN???

      Regards, Luis....!
        • 1. Re: FRM-41213 when calling reports from forms 11g Rel2
          myluism
          Does anybody have a clue???

          Thanks a lot ....!
          • 2. Re: FRM-41213 when calling reports from forms 11g Rel2
            Scott_Symonds
            Hi Luis,

            The reports server "rep_adminserver_myluism-pc_asinst_1" appears to be the in-process reports server. This is a reports server which runs as a part of WebLogic. Due to the naming conventions of the server name, it appears that everything is running under one WebLogic server "AdminServer" using port 7001 (I assume you configured Forms 11gR2 for Development mode). Anyway, the in-process reports server you are using is a part of the AdminServer (WLS_REPORTS if you configure Forms for deployment which creates three WebLogic servers), not OPMN.

            As it appears that the AdminServer is running, I have noticed that when the AdminServer comes up in this scenario, the in-process reports server does NOT start up. It has to be specifically called using "rwservlet" to start it up. You can start the reports server in your scenario by running the following URL: http://hostname:7001/reports/rwservlet/startserver. NOTE: Replace hostname with the name of your server or computer name. More information can be found in this article: http://pitss.com/us/2012/10/11/using-in-process-reports-server-causes-frm-41213-after-system-startup/

            After starting up the in-process reports server above, it will remain functional as long as the AdminServer is still up and running. If the AdminServer is rebooted (either by scripts or by a PC reboot), the URL above will need to be run again each time.

            Thanks,
            Scott (PITSS)