Home » Developer & Programmer » Reports & Discoverer » how to pass parameter to report (10g win xp)
how to pass parameter to report [message #335832] Wed, 23 July 2008 20:07
amdabd
Messages: 91
Registered: November 2007
Location: My Computer
Member
hi,
to call a report from a FORM I use the procedure
PROCEDURE rep_pass 
 IS
   repid        report_object;
   v_rep        VARCHAR2 (100);
   rep_status   VARCHAR2 (20);
BEGIN
   repid := FIND_REPORT_OBJECT ('rep_serv');
   SET_REPORT_OBJECT_PROPERTY (repid, report_desformat, 'htmlcss');
   SET_REPORT_OBJECT_PROPERTY (repid, report_server, 'repserver10g');
   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://localhost:8889/reports/rwservlet/'
                         || 'getjobid'
                         || SUBSTR (v_rep, INSTR (v_rep, '_', -1) + 1)
                         || '?'
                         || 'server=repserver10g',
                         '_blank'
                        );
   ELSE
      MESSAGE ('Error when running report');
   END IF;
END;
with defining the report path in the report node within the form

to pass a parameter to the report I try to use
DECLARE
	pl_id ParamList;
BEGIN
	pl_id := Create_Parameter_List('pl_id');
	Add_Parameter(pl_id, 'P_1', TEXT_PARAMETER, :BLOCK2.txt_pass);
	rep_serv;   --- call the procedure(report)
	Destroy_Parameter_List(pl_id); 
END;

at (where clause)in the report Query
and( DEPT.DEPTNO =:P_1)

the report run without passing the parameter
please, where is my error?
thanks

Previous Topic: Graphs based on quarters / number of days
Next Topic: help
Goto Forum:
  


Current Time: Fri Dec 02 16:28:33 CST 2016

Total time taken to generate the page: 0.19790 seconds