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.

Using a Key Map File<br />

The key mapping file might contain:<br />

KEY: REPORT=myreport DEPTNO=%1 MYPARAM=%2 %*<br />

This would generate <strong>the</strong> equivalent of <strong>the</strong> following command line request:<br />

rwclient REPORT=myreport DEPTNO=par1 MYPARAM=par2 parN<br />

Usage Notes<br />

■ In rwcgi URLs, <strong>the</strong> first option (that is <strong>the</strong> first information after <strong>the</strong> question<br />

mark) is treated as a key if it is not o<strong>the</strong>rwise a part of a name/value pair. If <strong>the</strong><br />

first option is not a name/value pair (i.e., keyword=value), <strong>the</strong>n <strong>the</strong> whole<br />

command line is used in lieu of a cgicmd.dat key entry.<br />

13.11.4 Using a Key with a Report Run as a JSP<br />

When you run a report as a JSP and want <strong>to</strong> call a command key in <strong>the</strong> cgicmd.dat<br />

file, you must use <strong>the</strong> cmdkey keyword in your URL. For example, your JSP URL<br />

might look like this:<br />

http://…/myreport.jsp?cmdkey=key<br />

When you use cmdkey with a JSP or rwservlet, you can place it anywhere within<br />

<strong>the</strong> query string. For example:<br />

http://…/example.jsp?parameter1=value1&cmdkey=keyname<br />

http://…/rwservlet?parameter1=value1&cmdkey=keyname<br />

Usage Notes<br />

Note: You can also use cmdkey with <strong>the</strong> rwservlet command.<br />

■ When using key mapping, <strong>the</strong> order in which <strong>the</strong> parameters are substituted from<br />

<strong>the</strong> URL in<strong>to</strong> <strong>the</strong> key is determined by <strong>the</strong> placement of CMDKEY in <strong>the</strong> URL. For<br />

example, suppose you have a key such as <strong>the</strong> following one in <strong>the</strong> cgicmd.dat<br />

file:<br />

mykeys: DEPTNO=%1 MYPARAM=%2<br />

Now, you execute a JSP report that references this key as follows:<br />

http://neptune.world.com:80/jsp/myreport.jsp?userid=scott/tiger@hrdb<br />

&cmdkey=mykeys&10&test<br />

Because of <strong>the</strong> placement of CMDKEY in this URL, <strong>the</strong> 10 corresponds <strong>to</strong> %1 and<br />

test corresponds <strong>to</strong> %2. Even though <strong>the</strong>y are not <strong>the</strong> first and second parameters<br />

in <strong>the</strong> URL, 10 and test are <strong>the</strong> first and second parameters <strong>to</strong> follow CMDKEY in<br />

<strong>the</strong> URL.<br />

13-20 <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!