Hello all.
I saw in this forum anyone was using this code for call a report from Forms 11g. In this case the code was in a press-buttom event.
My question is if is posible call a report from a menu (the .fmb in the menus is other or is independient) i mean, if i need call my report with the parameter (NIF) i dont know how my menu have access to a variable of other module.
if i declare :global.nif = :block.nif in CLIENTS.FMB, i can not access to :global.nif from my MENU_CLIENTS.FMB.
Am i lacking any concept or is imposible calling Reports from Options Menus, and is better to do in the own CLIENT.FMB with a button.
Thanks:
Example code for calling reports:
DECLARE
infor REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := find_report_object('INF_CLIENTES_PEDIDOS');
set_report_objetc_property (repid.);
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,'html'); -- PDF, HTMLCSS ...
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'RptSvr_Muqthadeer-LAP_asinst_2');
/*Parámetros */
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=p_nif='||:data.from_acct);
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');
/*the above code will help you to create in browser*/
ELSE
message('Error in report');
END IF;
END;