call_form using parameters
573708Jun 27 2007 — edited Jun 27 2007Hi, I am calling a form using call_form and am passing a parameter list in. I am unable to retrieve the parameter in the form thats being called and use it.
Code in when_new_form_instance on form to be called:
declare
pl_id PARAMLIST;
repid report_object;
begin
:parameter.rptserver := :global.report_server;
pl_id := GET_PARAMETER_LIST( 'rptparam' );
IF ID_NULL(pl_id) THEN
:parameter.repname := 'REPORT_NAME';
-- parameter is always null at this point
else
-- perform logic
end if;
code on when_button_pressed in calling form:
declare
pl_id PARAMLIST;
repid report_object;
begin
:parameter.rptserver := :global.report_server;
pl_id := GET_PARAMETER_LIST( 'rptparam' );
IF ID_NULL( pl_id ) THEN
pl_id := CREATE_PARAMETER_LIST( 'rptparam' );
IF ID_NULL( pl_id ) THEN
MESSAGE( 'Parameter List rptparam cannot be created.' );
RAISE FORM_TRIGGER_FAILURE;
END IF;
end if;
:id_number := '20070529.01';
ADD_PARAMETER( pl_id, 'Generation_ID', TEXT_PARAMETER, :id_number );
CALL_FORM('form_name',
hide,
no_replace,
query_only,
pl_id);
Destroy_Parameter_List( pl_id );
The parameter list is always null. Can someone provide a link or information how to properly handle this type of operation.