我想添加参数,以便我可以输出将指定输出

时间:2012-04-16 08:31:11

标签: forms oracle plsql oracle10g oracleforms

当我运行报告时,我得到输出显示并生成pdf报告知道当我输入employee_id = 101时,我想显示指定报告的平均值,而employee_id = 101应该替换,pdf应生成

DECLARE 
rept REPORT_OBJECT; 
v_rep VARCHAR2(100); 
rep_status varchar2(200); 
vc_runformat varchar2(200);
des_format ParamList; 
BEGIN 

--des_format :=create_parameter_list('input_params');

rept := find_report_object('EMPS'); 

SET_REPORT_OBJECT_PROPERTY(rept,REPORT_SERVER, 'repsrv'); 
SET_REPORT_OBJECT_PROPERTY(rept,REPORT_DESTYPE,FILE); 
SET_REPORT_OBJECT_PROPERTY(rept,REPORT_DESFORMAT,'PDF');
--SET_REPORT_OBJECT_PROPERTY(rept,REPORT_MODE,'BITMAP');
SET_REPORT_OBJECT_PROPERTY(rept,REPORT_desname,:control.filnam||to_char(sysdate,'hhmiss')||'.pdf');

--web.show_document('/reports/rwservlet/getjobid' || substr(v_rep,length('repsrv')+2) || '?server=' || 'repsrv','_blank');

--Add_Parameter(rept,report_DESNAME,'PDF');

v_rep := RUN_REPORT_OBJECT(rept); 
rep_status:=REPORT_OBJECT_STATUS(v_rep); 
--copy_report_object_output(v_rep, 'D:\girish\form\myreport.pdf');
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') 
LOOP 
rep_status := report_object_status(v_rep); 
END LOOP; 
IF rep_status='FINISHED' THEN 
message('REPORT WAS CORRECTLY RUN'); 
ELSE 
message('REPORT FAILED WITH STATUS: '||rep_status); 
END IF;
--destroy_parameter_list(des_format);
END;

我是oracle表单和报告的新手。 plss帮帮我

1 个答案:

答案 0 :(得分:1)

在报告中创建用户参数 按此参数筛选报告查询 传递前一代码中参数的值