Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

call_form using parameters

573708Jun 27 2007 — edited Jun 27 2007
Hi, 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2007
Added on Jun 27 2007
5 comments
760 views