3 Replies Latest reply: Jan 19, 2010 8:23 AM by Sarah RSS

    Call Report From Forms 10g

    LuKKa
      Hi
      I am using Forms10g.
      I want to call a report from my form and i have to pass 3 parameter.
      How do i do this ?
      Please help me .
      Its urgent .....
      Thannk you.
        • 1. Re: Call Report From Forms 10g
          François Degrelle
          Hello,

          Did you make a search on this forum ? This question has been answered so many times.

          Francois
          • 2. Re: Call Report From Forms 10g
            527733
            Check online help for RUN_REPORT_OBJECT and paramlist ..
            • 3. Re: Call Report From Forms 10g
              Sarah
              hi

              try something like this.
              DECLARE 
              repid REPORT_OBJECT;
              v_rep VARCHAR2(100);
              rep_status VARCHAR2(20);
              plid ParamList; 
              vParamValue number;
              BEGIN
              
              plid := Get_parameter_List('tmp'); 
              
              IF NOT Id_Null(plid) THEN 
              Destroy_parameter_List( plid ); 
              END IF; 
              plid := Create_parameter_List('tmp'); 
              add_parameter(plid,'p_parameter,text_parameter,to_char(:block.item));
              
              
              Add_parameter(plid, 'PARAMFORM', TEXT_parameter, 'NO');
              
              
              repid := FIND_REPORT_OBJECT('REPORT6');
              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_OTHER, 'paramform=no');
              
              v_rep := RUN_REPORT_OBJECT(repid,plid);
              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; 
              
              
              /*Display report in the browser*/ 
              WEB.SHOW_DOCUMENT('http://Machine_name:Port/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?
              '||'server=Report_server_name&P_parameter='||:block.item||
              '&paramform=no'); 
               
              END; 
              sarah