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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run_product question

Status
Not open for further replies.

bookor

MIS
Apr 21, 1999
33
US
I currently use a front end Oracle Forms 4.5 form with buttons that use run_product to submit Reports 2.5 reports. Lets say I have three or four form letters in Reports 2.5 submitted based on a SSN parameter. I want to submit several reports with the same button, for the same employee without staff having to click three or four buttons and re-entering the same ssn every time.<br>
<br>
In VB I would use a dialog box to get the SSN variable and then pass that to each report, but I cant seem to find any way to do the same thing with Developer.<br>
<br>
Any suggestions would be appreciated.<br>
<br>

 
What you need to do is create a parameter list and pass it to the reports:<br>
example:<br>
You have a screen field to enter the SSN.<br>
and a button to run the reports, the button has a when_button_pressed that executes the following<br>
program unit.<br>
<br>
<br>
<br>
PROCEDURE run_reports IS<br>
PL_ID PARAMLIST; <br>
BEGIN<br>
<br>
PL_ID := GET_PARAMETER_LIST ('report_plist');<br>
IF NOT ID_NULL(PL_ID) THEN<br>
-- this is just to make sure it clean<br>
DESTROY_PARAMETER_LIST ('report_plist');<br>
END IF;<br>
<br>
PL_ID := CREATE_PARAMETER_LIST('report_plist');<br>
Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'PRINTER'); <br>
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,'printer name'); <br>
Add_Parameter(pl_id,'ORIENTATION',TEXT_PARAMETER,'LANDSCAPE');<br>
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO'); <br>
add_parameter (pl_id, 'passed_ssn' , text_parameter ,:screen_block.ssn_item );<br>
run_product (reports, 'report1',synchronous,runtime,filesystem,pl_id,null);<br>
run_product (reports, 'report2',synchronous,runtime,filesystem,pl_id,null);<br>
run_product (reports, 'report3',synchronous,runtime,filesystem,pl_id,null);<br>
DESTROY_PARAMETER_LIST ('report_plist');<br>
END;<br>
<br>
<br>
<br>
In the select statement in the reports you have<br>
.<br>
.<br>
.<br>
and db_ssn = :passed_ssn<br>
.<br>
.<br>
.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top