Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

calling report from forms 11g in pdf format

1010331May 25 2014 — edited May 25 2014

Hi every one,

             I am working on forms that call report in a browser in pdf format.I am unable to get the data while .pdf file is getting after running the form.

here is my code:

PROCEDURE TEST_REPORT

IS

  repid REPORT_OBJECT;

  v_rep      VARCHAR2(100);

  rep_status VARCHAR2(20);

  pi_id      paramlist; --- Added

BEGIN

  repid := find_report_object('GLM0003E');

  --- Add parameter list

  pi_id := get_parameter_list('dt_param');

  if not Id_null(pi_id) then

      destroy_parameter_list(pi_id);  

  end if;

  --- Add parameters

  pi_id := create_parameter_list('dt_param');

  add_parameter(pi_id,'PARAMFORM',TEXT_PARAMETER,'no');

  add_parameter(pi_id,'start_acct',TEXT_PARAMETER,:data.from_acct);

  add_parameter(pi_id,'end_acct',TEXT_PARAMETER,:data.to_acct);

  add_parameter(pi_id,'start_date',TEXT_PARAMETER,:data.from_date);

  add_parameter(pi_id,'end_date',TEXT_PARAMETER,:data.to_date);  

  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'); -- PDF, HTMLCSS ...

  SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'RptSvr_Muqthadeer-LAP_asinst_2');

  set_report_object_property(repid, report_other,' paraform=no start_acct='||:data.from_acct||' '||'end_acct='||:data.to_acct||' '||'start_date='||to_char(:data.from_date,'dd/mm/yyyy')||' '||'end_date='||to_char(:data.to_date,'dd/mm/yyyy'));

  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://muqthadeer-lap:9002/reports/rwservlet/getjobid'|| SUBSTR(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=RptSvr_Muqthadeer-LAP_asinst_2','_blank');

 

  ELSE

    MESSAGE('Error in report');

  END IF;

END;

                    Help will be appreciable.

     Thank you

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2014
Added on May 25 2014
4 comments
2,321 views