Professional Documents
Culture Documents
1]
PURPOSE
-------
Demonstrate the Event-based publishing feature of Reports 9i/10G/10G R2 using
a
database trigger.
How do I implement?
-------------------
1) Create the PL/SQL API for Event-driven publishing in your database:
Run the script srwAPIins.sql (resides under <9iDSHome>/reports/admin/sql)
as follows:
a) Navigate to the directory <9iDSHome>/reports/admin/sql
(On Windows open command prompt and navigate to the directory.)
b) connect to SQL*Plus from the command prompt and then execute the
script from SQL prompt:
SQL>@srwAPIins.sql
c Y
c) This script asks for portal username and password. If you want to
secure your Reports Server through portal, provide the portal
username/password. However, you could run this script with any
user who has execute privilege on sys.xmlparser and sys.xmldom
packages. You need not have portal installed in the database.
3) Create the following procedure in your database to run your report, for
example, emp.jsp:
srw.add_parameter(myPlist,'GATEWAY','http://<server_name>:<port>/reports/rwse
rvlet');
srw.add_parameter(myPlist,'SERVER','myRepserver');
srw.add_parameter(myPlist,'REPORT','d:\work\emp.jsp');
srw.add_parameter(myPlist,'USERID','myuser/mypassword@orcl');
srw.add_parameter(myPlist,'AUTHID','portal_username/portal_password@orcl');
srw.add_parameter(myPlist,'DESTYPE','file');
srw.add_parameter(myPlist,'DESFORMAT','HTMLCSS');
srw.add_parameter(myPlist,'DESNAME','c:\temp\emp.htm');
myIdent := srw.run_report(myPlist);
EXCEPTION
when others then
raise;
END;
/
SQL>exec event_driven_report;
This will submit the job for execution. You can now check the status of
the job using SHOWJOBS. For example:
http://<server_name>:<port>/reports/rwservlet/showjobs?server=myRepserver
SQL>set serverout on
SQL>exec srw.start_debugging;
***********************************************************
* WELCOME TO EVENT-BASED-REPORTING API *
* API-Version : 9i *
* (C) Oracle Corporation, 2000 *
c
*
* Debugging turned ON *************************************
Now, you can see the step by step execution of the submitted reports job.
SQL>exec srw.stop_debugging;
LIMITATIONS
-----------
1) Event-driven API cannot be used with rwcgi or for running report as jsp.
It works only with 9i Reports servlet.
2) When implemented with database trigger, the latest change in the database
is not reflected in the report because the change is committed only when
the database trigger succeeds without any error and the report query runs
before this commit.
RELATED DOCUMENTS
---------------
Related
Products
£
c