|
|
Re: what is the substitute for BUTTON in 10g? [message #289730 is a reply to message #289619] |
Tue, 25 December 2007 22:57 |
amitmohangupta
Messages: 9 Registered: April 2007 Location: India
|
Junior Member |
|
|
first of all you need to compile the report in 10g report builder then you need to use run_report_objects instead of run_product in the form from which you are calling the report. i am sending you the example of that code
In the below code get_control_statuses is to get the path of report server to run which is saved in database.
/* Formatted on 2004/09/08 16:42 (Formatter Plus v4.8.5) */
PROCEDURE start_print(v_report VARCHAR2,v_county VARCHAR2)IS
pl_id PARAMLIST;
county VARCHAR2(60) := v_county;
report_id REPORT_OBJECT;
v_rep_job VARCHAR2(1000);
rep_status VARCHAR2(2000);
v_controlstrec CONTROL_STATUSES%ROWTYPE;
BEGIN
report_id := FIND_REPORT_OBJECT('reportname');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,v_report||'.rep');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,'rep_mtlwinas2_OraAS10gR2Inst1');
/*
** Check to see if the 'tmpdata' parameter list exists.
*/
pl_id := GET_PARAMETER_LIST ('tmpdata');
/*
** If it does, then delete it before we create it again in
** case it contains parameters that are not useful for our
** purposes here.
*/
IF NOT ID_NULL (pl_id)
THEN
DESTROY_PARAMETER_LIST (pl_id);
END IF;
/*
** Create the 'tmpdata' parameter list afresh.
*/
pl_id := CREATE_PARAMETER_LIST ('tmpdata');
/*
*/
ADD_PARAMETER (pl_id, 'paramform', text_parameter, 'NO');
ADD_PARAMETER (pl_id, 'THE_COUNTY_CLAUSE', text_parameter, county);
ADD_PARAMETER (pl_id, 'P_REST_OF_TITLE', text_parameter, :params.rest_of_title);
ADD_PARAMETER (pl_id, 'DESTYPE', text_parameter,'CACHE');
/*
** Run the report synchronously, passing the parameter list
*/
/*
RUN_PRODUCT (reports,
v_report,
synchronous,
runtime,
filesystem,
pl_id,
NULL
);
*/
v_rep_job := run_report_object(report_id,pl_id);
rep_status := REPORT_OBJECT_STATUS(v_rep_job);
IF NOT GET_CONTROL_STATUS (P_ID =>'rep_server',P_REC => V_CONTROLSTREC) THEN
MESSAGE('CANNOT FIND LOCATION OF REPORT PATH IN CONTROL STATUS PARAMETERS');PAUSE;
RAISE FORM_TRIGGER_FAILURE;
END IF;
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep_job,instr(v_rep_job,'_',-1)+1),'_blank');
EXCEPTION WHEN OTHERS THEN
message(SQLERRM);pause;
END;
|
|
|
|
|