01.02.2013 Views

Publishing Reports to the Web - Downloads - Oracle

Publishing Reports to the Web - Downloads - Oracle

Publishing Reports to the Web - Downloads - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Event-Driven <strong>Publishing</strong> API<br />

■ The SRW-Package contains all relevant functions and procedures for submitting<br />

jobs, checking job status, and cancelling jobs, as well as manipulating parameter<br />

lists.<br />

■ The ParamList-Type defines a parameter list. A parameter list is <strong>the</strong> main vehicle<br />

for passing values when submitting a job. A parameter list is required for each job<br />

submission. It must contain several key parameters.<br />

■ The ParamList-Object is required for such features as Advanced Queuing, where<br />

a parameter list must be s<strong>to</strong>red in <strong>the</strong> database so that it may be passed along with<br />

a message.<br />

These API elements are discussed in more detail in <strong>the</strong> following sections.<br />

The API is installed <strong>to</strong>ge<strong>the</strong>r with <strong>Oracle</strong>AS <strong>Reports</strong> Services Security and <strong>Oracle</strong>AS<br />

Portal, but nei<strong>the</strong>r is required. Installation scripts are also available separately should<br />

you want <strong>to</strong> install <strong>the</strong> API in<strong>to</strong> a database that does not also hold <strong>Oracle</strong> Portal:<br />

■ srwAPIins.sql installs <strong>the</strong> Events-Driven <strong>Publishing</strong> API.<br />

■ srwAPIgrant.sql grants access privileges <strong>to</strong> <strong>the</strong> API. Run this script for each<br />

user <strong>to</strong> whom you will grant access <strong>to</strong> <strong>the</strong> API. If everyone may have access, you<br />

can run this once and grant access <strong>to</strong> PUBLIC.<br />

■ srwAPIdrop.sql removes <strong>the</strong> API.<br />

17.1.2 Creating and Manipulating a Parameter List<br />

A parameter list is a PL/SQL variable of type SRW_PARAMLIST. A variable of this type<br />

is an array of 255 elements of type SRW_PARAMETER, which itself consists of two<br />

attributes: NAME and VALUE. The API provides procedures for manipulating<br />

parameter lists, including:<br />

■ Add_Parameter<br />

■ Remove_Parameter<br />

■ Clear_Parameter_List<br />

These procedures allow you <strong>to</strong> manipulate your parameter lists. They are discussed<br />

briefly in this section. You'll find more information in <strong>the</strong> <strong>Oracle</strong> <strong>Reports</strong> API<br />

documentation.<br />

Note: Look for upcoming information about <strong>Reports</strong> APIs on <strong>the</strong><br />

<strong>Oracle</strong> Technology Network, (http://otn.oracle.com).<br />

17.1.2.1 Add_Parameter<br />

Whenever you use a parameter list for <strong>the</strong> first time, it must be initialized before you<br />

can add parameters <strong>to</strong> it. For example:<br />

DECLARE<br />

myPlist SRW_PARAMLIST;<br />

BEGIN<br />

myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));<br />

srw.add_parameter(myPlist,'myParameter','myValue');<br />

END;<br />

Both attributes of a parameter (NAME and VALUE) are of type VARCHAR2 and may<br />

not exceed a length of 80 characters for <strong>the</strong> NAME and 255 characters for <strong>the</strong> value.<br />

17-2 <strong>Oracle</strong> Application Server <strong>Reports</strong> Services <strong>Publishing</strong> <strong>Reports</strong> <strong>to</strong> <strong>the</strong> <strong>Web</strong>

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

Saved successfully!

Ooh no, something went wrong!