2 Replies Latest reply: Jan 1, 2013 10:05 AM by Andreas Weiden RSS

    Calling the reports in form menu 11g Form

    978817
      Sir,
      How to calling the report in Form menu 11g

      Command Type = PL/SQL
      Menu Item Code
      web.Show_Document() not accepted

      Please guide me and provide the sample for calling report in menu 11g

      Thanks
        • 1. Re: Calling the reports in form menu 11g Form
          esmid2
          declare
          repid           REPORT_OBJECT;
                    PARAM_STRING VARCHAR2(500);
          PRINTING NUMBER:=1;
          NOPRINTING NUMBER:=0;
          ALRT NUMBER;
          REP_NAME VARCHAR2(300);
          STN_CODE VARCHAR2 (300);
               rep_status           VARCHAR2(20);
          v_rep           VARCHAR2(100);

          BEGIN

               REP_NAME:='PRS_REP_POST_STS.JSP';

          PARAM_STRING:=
                    ' PARAMFORM=NO'||
          ' P_SEMAT='||:BLOCK26.PF_P_SEMAT1||
          ' GRP='||:BLOCK26.PF_GRP||
               ' COM_CD='||:GLOBAL.COM_CD||
               ' P_REP_STN_CD='||STN_CODE||
          ' P_LOGO='||:P_LOGO;
          --     co$fyi ('1') ;
                    repid := find_report_object('REPS');
          IF FORM_SUCCESS
          THEN
               alrt := show_alert('ALERTPRINT');

          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,cache);
          --SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'HTMLCSS');            
          SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_wls_reports_aps112_asinst_1');
                         v_rep := RUN_REPORT_OBJECT(repid);
                         
                         co$fyi (v_rep) ;
                         rep_status := REPORT_OBJECT_STATUS(v_rep);
                         WEB.SHOW_DOCUMENT('http://192.168.0.35:9002/reports/rwservlet/getjobid'||
          substr(v_rep, instr(v_rep,'_',-1)+1)||'?'||'server=rep_wls_reports_aps112_asinst_1','_blank');
                              
          ELSE
          MESSAGE(DBMS_ERROR_CODE || ': ' || DBMS_ERROR_TEXT||'2');
          END IF;      

          end;
          • 2. Re: Calling the reports in form menu 11g Form
            Andreas Weiden
            You cannot run a report directly from a menu in forms 10g /11g. You have to create a "Dummy"-form, call that from the menu, let it call the report in the WHEN-NEW-FORM-INSTANCE-trigger and exit the form again.