Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass parameter from Oracle Forms to reports 2

Status
Not open for further replies.

rabrabbie

Programmer
Jul 3, 2003
10
0
0
US
Hi,

I am studying Oracle 6i Forms/Reports, how do I
pass a parameter from Oracle forms to Oracle reports ?

This is the syntax I used in the oracle forms, to print the so_totals report.

IF ID_NULL(CR_PARAM) THEN
cr_param := create_parameter_list('CREATEP');
ELSE
add_parameter(cr_param,'customer_pass',text_parameter,
my_cust);
END IF;

RUN_PRODUCT (REPORTS,'C:\REPORTS\SO_TOTALS',
ASYNCHRONOUS,RUNTIME,FILESYSTEM,CR_PARAM,NULL);

How do I read the 'CR_PARAM' parameter list,which contains the customer, to be printed in the oracle reports?

My goal is to print the SO based on the customer selected in the Oracle forms.
example > SELECT * FROM SALES_ORDER where customer_id = ?


Thanks.

 
You must have a parameter called CUSTOMER_PASS in your report.

[tt]SELECT * FROM SALES_ORDER where customer_id = :customer_pass;[/tt]
 

Thank you lewisp for the response.

I have defined the parameter "customer_pass"
in the report. But, what is happening is
after calling the report from the Oracle Forms
a Runtime Parameter Form displays. It shows
the customer pass parameter and it is null.
I still have to enter a value to produce the
report.

Is it possible to produce the report at once
after pressing the PRINT button without going
to the Runtime Parameter Form?
 
I have added the 'paramform=NO' parameter, but still the runtime parameter form exists. I have also defined the 'customer_pass' parameter in the user parameters of Oracle Reports. However, when the RUNTIME Parameter appears the customer pass parameter is blank.

IF ID_NULL(CR_PARAM) THEN
cr_param := create_parameter_list('CREATEP');
ELSE
add_parameter(cr_param,'customer_pass',text_parameter,
my_cust);
add_parameter(cr_param,'PARAMFORM',text_parameter,
'NO');
END IF;
RUN_PRODUCT(REPORTS,'C:\REPORTS\SO_TOTALS',
ASYNCHRONOUS,RUNTIME,FILESYSTEM,CR_PARAM,NULL);

Is there a way to check if parameters are being passed from Oracle Forms to Oracle reports? or Is there something to tag(checkbox,button)in the preferences,administration options of the Forms & Reports to connect them?

Thanks.
 
Check your code: once you have no CR_PARAM list yet, you create it but not populate. Should be

IF not ID_NULL(CR_PARAM) THEN
destroy_parameter_list(cr_param);
END IF;

cr_param := create_parameter_list('CREATEP');
add_parameter(cr_param,'customer_pass',text_parameter, my_cust);
add_parameter(cr_param,'PARAMFORM',text_parameter, 'NO');


Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top