2 Replies Latest reply: Nov 27, 2012 2:19 AM by 915741 RSS

    can not run the report on server

    915741
      hello everyone, help me jump this hurdle...

      i am successful in calling a report from a from an getting it displayed in web browser as PDF when i do it on local PC.

      but when i do it on server i does not work...
      here i write what i have done to get report run on server, please help me where i am wrong and what i need to do......

      i have put the form on server and path is /user1/appl/prlheep/forms/mani/abc.fmb
      and put rdf file /user1/appl/prlheep/forms/mani/reports/rep.rdf
      granted permission on rep.rdf to execute.
      in the fmb file, under Reports node, opened property pallete of concerned report and changed the Filename to /user1/appl/prlheep/forms/mani/reports/rep.rdf
      and procedure to call report is..
      PROCEDURE CALL_REP_PFLETTER IS
        
                 fname varchar2(100);
                 IPADDRESS VARCHAR2(20);
                 repid REPORT_OBJECT :=find_report_object('PFLETTER');           
      
      
                          /*  l_report_server VARCHAR2(50) :='rep_c26p003'; 
                            l_server_host VARCHAR2(50) :='c26p003.bhelhwr.co.in';
                            l_server_port VARCHAR2(10) :='8889'; */                    --this is useful when it is run on local pc
        
       
                
                 l_report_server VARCHAR2(50) :='rep_hwrapp1_mid_home';
                 l_server_host VARCHAR2(50) ;
                 l_server_port VARCHAR2(10) :='7778';  
      
                 l_jobid VARCHAR2(10) :=NULL;
                 v_rep VARCHAR2(100) :=NULL;
                 rep_status varchar2(2000);
                 pl_id ParamList;
                 pl_name VARCHAR2(10) := 'user_data'; 
      
      
      BEGIN
                   begin                         
                        SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') 
                        INTO IPADDRESS 
                        FROM DUAL;
                        l_server_host:=IPADDRESS;
                   exception 
                          when no_data_found then 
                             message('IP ADDRESS '||SQLERRM);
                             raise form_trigger_failure;
                      WHEN OTHERS THEN 
                         MESSAGE(SQLERRM); 
                         raise form_trigger_failure;                        
                   end;
           
      
                 IF NOT Id_Null(repid) THEN   
                             pl_id := Get_Parameter_List(pl_name); 
                             
                             IF Id_Null(pl_id) THEN 
                             v_rep :=NULL;
                             else
                                        DESTROY_PARAMETER_LIST(pl_name); 
                             end if;
                             pl_id :=Create_Parameter_List(pl_name); 
                 
                         Add_Parameter(pl_id,'STFNO',TEXT_PARAMETER,:LETTER.stAfFno); 
                   
                                        
                            SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH); 
                            SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
                            
                            SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
                          
                            SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
                            SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,l_report_server);
                 
                            SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no STFNO='||:LETTER.stAFfno );
                            
                             v_rep := RUN_REPORT_OBJECT(repid); 
                             rep_status := REPORT_OBJECT_STATUS(v_rep); 
                             l_jobid :=substr(v_rep,instr(v_rep,'_',-1)+1);
      
      
                             WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
                             LOOP
                                         rep_status := report_object_status(v_rep);
                             END LOOP;
                             
                       IF rep_status = 'FINISHED' THEN
                           rep_status :='http://'||l_server_host||':'||l_server_port||'/reports/rwservlet/getjobid'||l_jobid||'?'||'server='||l_report_server;
                           WEB.SHOW_DOCUMENT(rep_status,'_blank');
                 ELSE  
                      RAISE FORM_TRIGGER_FAILURE;
                 END IF;
                 
               END IF;        
                
      END;
      app server version in 10g
      database version 11g