Skip Headers
Oracle® Database PL/SQL Packages and Types Reference
11g Release 1 (11.1)

B28419-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

101 DBMS_REPORT

The DBMS_REPORT package allows the database server components to provide reports to the user in XML, HTML, and formatted text. Reports are typically generated using the component's own own PL/SQL Package (for example, DBMS_SQLPA for SQL Performance Analyzer), but components generrating reports in a piecemeal fashion may reference a DBMS_REPORT subprogram for requesting more granular data.

See Also:

This chapter contains the following topics:


Using DBMS_REPORT


Security Model

The subprograms in the DBMS_REPORT package operate under the current user's privileges. When reports are generated by means of the DBMS_REPORT interface, the component building the report will check to ensure the current user has all of the necessary privileges to see that report.


Views

The DBMS_REPORT package uses views listed in the Oracle Database Reference:


Summary of DBMS_REPORT Subprograms

Table 101-1 DBMS_REPORT Package Subprograms

Subprogram Description

FORMAT_REPORT Function

Translates a report in XML format (built by the component API or the GET_REPORT Function function) into another format

GET_REPORT Function

Builds a report in any format



FORMAT_REPORT Function

This function translates a report in XML format (built by the component API or the GET_REPORT Function function) into another format. Supported formats can be found by querying the metadata in the REPORT_FORMATS view.

Syntax

DBMS_REPORT.FORMAT_REPORT (
   report       IN  XMLTYPE,
   format_name  IN  VARCHAR2)
 RETURN CLOB;

Parameters

Table 101-2 FORMAT_REPORT Function Parameters

Parameter Description

report

Report to format

format_name

Format name to apply


Return Values

Completed reports are returned in CLOB format which can represent XML, HTML, or Text, depending on the format requested.


GET_REPORT Function

This function builds a report in any format. The user passes a report reference string as specified by the component for which the report is generated. Typically this function is used to fetch sub-reports that are referenced by a top-level report built by the component's own interface (for example, DBMS_SQLPA for SQL Performance Analyzer).

Syntax

DBMS_REPORT.GET_REPORT (
   report_reference   IN   VARCHAR2)
 RETURN CLOB;

Parameters

Table 101-3 GET_REPORT Function Parameters

Parameter Description

report_reference

Reference string uniquely identifying the report to generate as specified by the component


Return Values

Completed reports are returned in CLOB format which can represent XML, HTML, or Text, depending on any formatting specified in the reference string.