Oracle® Fusion Middleware Publishing Reports to the Web with Oracle Reports Services 11g Release 1 (11.1.1) Part Number B32121-01 |
|
|
View PDF |
To batch register reports in Oracle Portal, perform the following steps:
To generate a SQL script that you can execute in SQL*Plus to register your reports, do the following:
From the operating system prompt (DOS or UNIX), enter the rwconverter
command with the keywords to batch register the report definition files.
Note:
To successfully create a script file with the necessary load functions, you specify theDTYPE
, STYPE
, SOURCE
, and DEST
keywords. To create a functional package in Oracle Portal, you will need to specify the P_SERVERS
, P_PRIVILEGE
, P_TYPES
, P_FORMATS
keywords in addition to the keywords used to create the script file.Following is an example rwconverter
command line on Microsoft Windows:
rwconverter.exe dtype="register" stype="rdffile" source="(security.rdf,earnings.rdf,acc_pay.rdf)" dest="(output.sql)" p_owner="PORTAL_APP" p_servers="(repserver,acct_server)" p_description="restricted report" p_privilege="(SCOTT,JABERS,ACCT)" p_availability="production" p_types="(Cache,printer)" p_formats="(HTMLCSS,PDF)" p_printers="(sales_printer,acct_printer)" p_pformTemplate="public.finance_template" p_trigger="Is begin IF UPPER(DESTYPE) = ''PRINTER'' AND EMPNAME = ''SMITH'' THEN RETURN(TRUE); ELSE RETURN(FALSE); END IF; end;"
This command line generates a SQL script file named output.sql
that contains the following:
SET SERVEROUTPUT ON VAR STATUS NUMBER; EXEC :STATUS := RWWWVREG.REGISTER_REPORT (P_NAME=>'Security', P_OWNER=>'PORTAL_APP', P_SERVERS=>'repserver,acct_server', P_FILENAME=>'security.rdf', P_DESCRIPTION=>'restricted report', P_PRIVILEGE=>'SCOTT,JABERS,ACCT', P_AVAILABILITY=>'production' P_TYPES=>'Cache,printer', P_FORMATS=>'HTMLCSS,PDF', P_PRINTERS=>'sales_printer,acct_printer P_PFORMTEMPLATE=>'public.finance_template' P_PARAMETERS=>'(P_LASTNAME) (P_SSN)', P_TRIGGER=>'Is begin IF UPPER(DESTYPE) = ''PRINTER'' AND EMPNAME = ''SMITH''THEN RETURN(TRUE); ELSE RETURN(FALSE); END IF; end;'); EXEC :STATUS := RWWWVREG.REGISTER_REPORT (P_NAME=>'Earnings', P_OWNER=>'PORTAL_APP', P_SERVERS=>'repserver,acct_server', P_FILENAME=>'earnings.rdf', P_DESCRIPTION=>'restricted report', P_PRIVILEGE=>'SCOTT,JABERS,ACCT', P_AVAILABILITY=>'production' P_TYPES=>'Cache,printer)', P_FORMATS=>'HTMLCSS,PDF', P_PRINTERS=>'sales_printer,acct_printer', P_PFORMTEMPLATE=>'public.finance_template', P_TRIGGER='Is begin IF UPPER(DESTYPE) = ''PRINTER'' AND EMPNAME = ''JABERS'' THEN RETURN(TRUE); ELSE RETURN(FALSE); END IF; end;'); EXEC :STATUS := RWWWVREG.REGISTER_REPORT (P_NAME=>'Acc_pay', P_OWNER=>'PORTAL_APP', P_SERVERS=>'repserver,acct_server', P_FILENAME=>'acc_pay.rdf', P_DESCRIPTION=>'restricted report', P_PRIVILEGE=>'SCOTT,JABERS,ACCT', P_AVAILABILITY=>'production' P_TYPES=>'Cache,printer', P_FORMATS=>'HTMLCSS,PDF', p_printers=>'sales_printer,acct_printer', P_PFORMTEMPLATE=>'public.finance_template' P_TRIGGER=>'Is begin IF UPPER(DESTYPE) = ''PRINTER'' AND EMPNAME = ''JABERS''THEN RETURN(TRUE); ELSE RETURN(FALSE); END IF; end;');
For more information on the contents of this SQL script file, refer to Section C.3, "PL/SQL Batch Registering Function".
Check the reports.log
file, which is typically written to the current working directory, for errors that may have occurred during the conversion process. If the reports.log
file was not generated, then no errors were encountered by rwconverter
.
You can now optionally edit the system and user parameter values as desired. For example, the first RWWWVREG
function in the sample script generated an additional parameter called P_PARAMETERS
. This occurred because the security.rdf file contains two user-defined parameters, P_LASTNAME
and P_SSN
:
P_PARAMETERS=>'(P_LASTNAME)(P_SSN)',
In this case, you can optionally define the default, low, and high values, or a list of values for each user parameter if you want to restrict the values the user may enter at runtime. Similarly, if you want to restrict system parameters, such as COPIES
, to limit the number of copies a user can make, you do so using the P_PARAMETERS
keyword. The edited P_PARAMETERS
keyword might look like the following:
P_PARAMETERS=>'(P_LASTNAME, LOV=LASTNAME_LOV)(P_SSN)(COPIES, DEFAULT=1,LOW=1,HIGH=2)'
This revised code segment imposes the following restrictions on the report:
The P_LASTNAME
user parameter is limited to the values listed in the LASTNAME_LOV
list of values.
A user-supplied value for P_SSN
is required.
The default value of the COPIES
system parameter is one and the number of printed copies must be in a range from 1 to 2.
Save and close the output.sql
file.
To actually register your reports in Oracle Portal, you must run the script generated for you by rwconverter
:
Start SQL*Plus and connect to the Oracle Portal schema that you want to own the packaged procedures.
From the SQL*Plus command prompt, execute the script you created with rwconverter
:
@ output.sql
The script will execute and create packages in Oracle Portal for each report listed in the script with the specified parameters.
Log in to Oracle Portal as a user with RW_ADMINISTRATOR
privileges.
Click the Corporate Documents tab.
Click Builder.
Click the Administer tab.
In the Oracle Reports Security portlet, click Oracle Reports Security Settings.
In the Reports Definition File Access portlet, enter the P_NAME
of one of the reports you batch registered in your SQL script.
Click Edit. The Manage Component page is displayed.
Click Edit at the bottom of the page to edit the parameters of the report.
Review and edit the parameters as desired.
Click OK.
Click Close.
Repeat steps 8 through 13 for each report that you batch registered with your script.