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:
Oracle Database Reference for more information about views associated with DBMS_REPORT
.
This chapter contains the following topics:
Security Model
Views
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.
The DBMS_REPORT
package uses views listed in the Oracle Database Reference:
Table 101-1 DBMS_REPORT Package Subprograms
Subprogram | Description |
---|---|
Translates a report in XML format (built by the component API or the GET_REPORT Function function) into another format |
|
Builds a report in any format |
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.
DBMS_REPORT.FORMAT_REPORT ( report IN XMLTYPE, format_name IN VARCHAR2) RETURN CLOB;
Table 101-2 FORMAT_REPORT Function Parameters
Parameter | Description |
---|---|
report |
Report to format |
format_name |
Format name to apply |
Completed reports are returned in CLOB
format which can represent XML, HTML, or Text, depending on the format requested.
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).
DBMS_REPORT.GET_REPORT ( report_reference IN VARCHAR2) RETURN CLOB;
Table 101-3 GET_REPORT Function Parameters
Parameter | Description |
---|---|
report_reference |
Reference string uniquely identifying the report to generate as specified by the component |
Completed reports are returned in CLOB
format which can represent XML, HTML, or Text, depending on any formatting specified in the reference string.