11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

394<br />

** Create a parameter list for parameter passing<br />

*/<br />

pl := Create_Parameter_List(’tmp’);<br />

/*<br />

** Get the Where Clause from the Last Query<br />

** using a user-defined function<br />

*/<br />

wc := Last_Where_Clause;<br />

/*<br />

** If there is a Non-NULL Last Where clause to<br />

** pass, add a text parameter to the parameter<br />

** list to specify the parameter name and its<br />

** value. In this case the report definition has<br />

** a parameter named ’the_Where_Clause’ that<br />

** it’s expecting.<br />

*/<br />

IF wc IS NOT NULL THEN<br />

Add_Parameter(pl, -- Handle to<br />

-- the ParamList<br />

’the_Where_Clause’, -- Name of Parameter<br />

-- in the Report<br />

TEXT_PARAMETER, -- Type of Parameter<br />

wc -- String Value<br />

-- for Parameter<br />

);<br />

END IF;<br />

/*<br />

** Launch the report, passing parameters in the<br />

** parameter list.<br />

*/<br />

Run_Product(REPORTS, -- The Product to call<br />

’rep0058.rdf’, -- The name of the<br />

-- report definition<br />

SYNCHRONOUS, -- The communications mode<br />

BATCH, -- The Execution Mode<br />

FILESYSTEM, -- The Location of the<br />

-- reports document<br />

pl -- The Handle to the<br />

); -- parameter list<br />

/* Delete the parameter list */<br />

Destroy_Parameter_List(pl);<br />

END;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!