Error ruuning menu [message #84051] |
Thu, 22 January 2004 02:36 |
Mayank
Messages: 8 Registered: July 2002
|
Junior Member |
|
|
Dear Friends
(im using oracle forms 9iAS
When Im trying to run my report from menu from
its giving me error message as frm-41842 , use run report obejct instead of run product
can any one please mail me the code regarding this ...
or any alternate code for run report obect
|
|
|
Re: Error ruuning menu [message #84054 is a reply to message #84051] |
Thu, 22 January 2004 09:32 |
prashant
Messages: 122 Registered: September 2000
|
Senior Member |
|
|
u cannot directly pass parameters from the menu in the Run_product
create a paramlist and then pass the parmlist variable in the run_product
|
|
|
|
Re: how to run a report from a form [message #84082 is a reply to message #84061] |
Mon, 26 January 2004 22:23 |
SHANKAR.K.
Messages: 7 Registered: April 2003
|
Junior Member |
|
|
mayank try this
DECLARE
tmp_repid REPORT_OBJECT; -- This is to store the report object id.
tmp_rep_status VARCHAR2(30);
tmp_repname VARCHAR2(30) := 'abc'; ----- name of the RDF ( this should not be 'rep')
tmp_handle VARCHAR2(100); -- This will be used as a return handle when the object id is fetched.
tmp_plid ParamList;
BEGIN
tmp_plid := Get_Parameter_List('RepData');
IF NOT ID_NULL(tmp_plid) THEN
DESTROY_PARAMETER_LIST( tmp_plid );
END IF;
tmp_plid := CREATE_PARAMETER_LIST ('RepData');
tmp_repid := FIND_REPORT_OBJECT(tmp_repname);
-- Setting other runtime parameters.
SET_REPORT_OBJECT_PROPERTY(tmp_repid, REPORT_FILENAME , tmp_repname||'.rdf');
SET_REPORT_OBJECT_PROPERTY(tmp_repid, REPORT_DESTYPE , FILE);
SET_REPORT_OBJECT_PROPERTY(tmp_repid, REPORT_DESNAME , tmp_filename);
SET_REPORT_OBJECT_PROPERTY(tmp_repid, REPORT_DESFORMAT, 'pdf');
---- add the parameters here that you are passing to the report
Add_Parameter(tmp_plid,'P_ALL_PARAMS',TEXT_PARAMETER, 'abc' );
tmp_handle := RUN_REPORT_OBJECT(tmp_repid, tmp_plid);
-- The following loop ensures that the file is not opened, before it is completely created.
LOOP
tmp_rep_status := REPORT_OBJECT_STATUS(tmp_handle);
EXIT WHEN tmp_rep_status IN ('FINISHED', 'TERMINATED_WITH_ERROR');
END LOOP;
IF tmp_rep_status = 'TERMINATED_WITH_ERROR' THEN
message('Unable to Print Report.');
END IF;
END;
|
|
|