Oracle® Enterprise Manager Cloud Control Extensibility Programmer's Reference 12c Release 2 (12.1.0.2) Part Number E25161-06 |
|
|
PDF · Mobi · ePub |
Defining new target types in Enterprise Manager through metadata plug-ins provides you with the opportunity to add new report definitions. Plug-ins also allow you to add permanent (SYSTEM) target type specific report definitions to Enterprise Manager using the Information Publisher XML file format.
Note:
Information Publisher is deprecated as of Enterprise Manager 12c and Oracle recommends using BI Publisher for newly created reports.This chapter covers the following:
As an plug-in developer, you are responsible for the following steps with regard to adding information publisher reports:
Design your reports based on the information you wish to show.
Create your report definition file
Define the SQL and PL/SQL queries used to extract information from the management repository.
For more information, see Defining SQL or PL/SQL Queries.
Create a test report interactively from the Enterprise Manager console
For more information, see Creating a Test Report Interactively from the Enterprise Manager Console.
Use EM CLI to generate the report definition file
For more information, see Using EM CLI to Generate the Report Definition File.
Adding report definitions through metadata plug-ins creates target type specific SYSTEM reports. SYSTEM report definitions are handled differently than definitions created through the Information Publisher user interface. SYSTEM reports are permanent and cannot be deleted or edited by Enterprise Manager administrators. You can add multiple report definitions to a metadata plug-in, thereby allowing you to associate multiple reports with a specific target type.
Adding SYSTEM report definitions using metadata plug-ins and the Information Publisher XML files allows users to access reports from the Enterprise Manager console's Information Publisher Report Definition page.
All report definitions added using metadata plug-ins are available from Information Publisher's Report Definitions page. As with out-of-box SYSTEM report definitions, those added using metadata plug-ins are organized according to report category and subcategory. SYSTEM report definitions cannot be deleted from the Enterprise Manager console.
A report definition file is an XML file that contains code to extract pertinent information from the Management Repository (using repository views) and the report elements used to format and display that data. The Information Publisher API allows you to specify the report elements and parameters that you normally specify when creating a report definition from the Enterprise Manager console. The fully formed report definition file consists of four basic XML tags and takes on a hierarchical tag structure:
<ReportDefinition>
Defines report identification parameters as well as encapsulating all report elements used to build the report
<ReportElement>
Defines the graphical display elements such as tables, charts, or text.
<ReportElementParameters>
Defines specific parameters required by individual report elements.
<ReportWideParmeters>
Defines parameters used by all report elements in the report definition file.
As previously mentioned, the content of a report definition file consists of XML tags used to construct a report. You will use both the Enterprise Manager console and EM CLI to develop and generate your report definition file.
Metadata plug-ins allow you to define as many report definition files as required for a particular target type.
The process of developing a valid report definition file involves three steps:
Defining SQL or PL/SQL Queries
The first step in creating your report definition is to create the SQL or PL/SQL queries used to extract the requisite report information from the Management Repository. Enterprise Manager provides management views with which you can safely extract data from the Management Repository without reading from the base tables. Using repository views protects your queries from changes to the repository schema that may occur in future releases and ensures your SYSTEM report definitions remain functional.
The following query was used to extract information about blackout history for a target. The query uses the MGMT$BLACKOUT_HISTORY, MGMT$BLACKOUTS, and MGMT$TARGET repository views. The query uses the MGMT$METRIC_CURRENT repository view.
select 'senior mts', count(value) from mgmt$metric_current where metric_column = 'Title' and LOWER(value) like '%senior member%' and target_guid = ??EMIP_BIND_TARGET_GUID?? select bh.created_by "Created by", bh.start_time "Start", bh.end_time "End", bo.reason "Reason", bo.description "Description" from MGMT$BLACKOUT_HISTORY bh, MGMT$TARGET tgt, MGMT$BLACKOUTS bo where tgt.target_name = bh.target_name and tgt.target_type = bh.target_type and tgt.target_guid = ??EMIP_BIND_TARGET_GUID?? and bo.blackout_guid = bh.blackout_guid order by end_time desc union select 'consulting mts', count(value) from mgmt$metric_current where metric_column = 'Title' and LOWER(value) like '%consulting%' and target_guid = ??EMIP_BIND_TARGET_GUID?? ;
When an administrator views a report from the Enterprise Manager console that contains this SQL query string, Information Publisher automatically binds the unique identifier for the selected target to the ??EMIP_BIND_TARGET_GUID?? placeholder in the SQL query string. The documentation for Chart from SQL and Table from SQL parameters provide information on this bind variable placeholder as well as others you can include in your SQL query string.
Creating a Test Report Interactively from the Enterprise Manager Console
Once you have written and tested the SQL or PL/SQL query, you can use the Enterprise Manager console to generate a version of your report interactively using the Chart from SQL and Table from SQL report elements. By using the Information Publisher user interface, you can easily prototype reports without having to create a report definition file and import Plug-in Archive (OPAR) files.
You can also use this method of interactive prototyping to refine your queries and ensure that the data extracted from the Management Repository and how that information is rendered in your report meets your reporting requirements.
Using EM CLI to Generate the Report Definition File
Once you are satisfied with the way your report is being rendered by Information Publisher, you are ready to create the report definition file. To do this, you use EM CLI to generate the XML based Report Definition file. The EM CLI export_report
verb is used to export the report definition you developed using the Enterprise Manager console (stored in the Management Repository) and to generate the XML report definition file. For example:
>emcli export_report -title="resource report" -owner="ADMINISTRATOR_JOE" -output_file="$HOME/reports/resource_report.xml"
Once the report definition file is generated, you will need to edit the XML to insert your own plug-in specific information, such as product_name, component_name, and oms_version.
Example 4-1 shows the content of the report definition file for a report detailing host configuration.
Example 4-1 Host Configuration Report Definition File
<?xml version = '1.0' encoding = 'UTF-8'?> <ReportDefinition title="Host Performance Overview" description="Overview of host performance" system_report="0" category="Sample Host Reports" sub_category= "Performance Reports" show_navigation="1" generate_context="0" add_toc="0" product_name="EM" component_name="oracle_hostsample" is_jit_multi_target="0" target_type="oracle_hostsample" is_jit_target="1" style="BLAF" oms_version="11.1.0.1.0" xmlns="http://www.example.com/DataCenter/ReportDefinition"> <ReportElement element_row="1" suppress_render="0" element_name_nlsid="IPMSG_USER_CHART_FROM_SQL" header_nlsid="Average CPU Utilization (%)" element_type_nlsid="IPMSG_ANY_TARGET_TYPE" element_order="0"> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. ChartParamController.chartType" parameterValue="pieChart"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip. render.elem.sqlStatement" parameterValue="select column_label, value "CPU Utilization (%)" 
 from mgmt$metric_current where 
 target_guid = ??EMIP_BIND_TARGET_GUID??
 and metric_name = 'CPUPerf'"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render. elem.ChartParamController.width" parameterValue="200"/> </ReportElement> <ReportElement element_row="3" suppress_render="0" element_name_nlsid="IPMSG_USER_CHART_FROM_SQL" header_nlsid="Memory Utilization (KB)" element_type_nlsid="IPMSG_ANY_TARGET_TYPE" element_order="1"> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render. elem.ChartParamController.legendPosition" parameterValue="south"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip. render.elem.ChartParamController.chartType" parameterValue="barChart"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip. render.elem.sqlStatement" parameterValue="select column_label, value "Memory Utilization (KB)"
 from mgmt$metric_current where 
 target_guid = ??EMIP_BIND_TARGET_GUID??
 and metric_name = 'MemoryPerf'"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render. elem.ChartParamController.visualOrientation" parameterValue="horizontal"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip. render.elem.ChartParamController.width" parameterValue="600"/> </ReportElement> </ReportDefinition>
With the ability to add report definitions to Enterprise Manager comes the responsibility of maintaining and updating the report definitions. Familiarity with the way in which Enterprise Manager handles report definitions will allow you to anticipate system behavior and plan for backwards compatibility.
When report definitions are deployed using metadata plug-ins, Enterprise Manager allows newer versions of the report definitions to be installed. Report definitions which are not valid with a newer version of Enterprise Manager should be updated and redeployed with the new version of the plug-in. Enterprise Manager will not install older versions of a report definition.
Report definitions, as with metadata plug-ins in general, should be designed with backwards compatibility in mind. Future versions of report definitions should support previous versions of the target type metadata. Report definition-metadata version incompatibility will be most apparent in the following situations:
Report definitions included with metadata plug-in version 1 and not included with metadata plug-in version 2 will not disappear when version 2 is deployed.
If version 1 and version 2 of a metadata plug-in are both deployed to the system, Management Agents will collect data based on the metadata of the version installed at that Agent; some will collect for version 1 metadata and some for version 2 metadata. Only the version 2 report definitions will be installed (appear in the Enterprise Manager console). For this reason, version 2 report definitions must support both versions of the metadata.
The Information Publisher XML based report definition file provides an easily editable medium for defining and customizing your Information Publisher reports using simple XML tags.
Use the following XML tags to define and manipulate report information when creating report definition files.
The <ReportDefinition>
tag is the first XML tag that appears in the report definition file and specifies essential information about your report such as title, description, product name, or Oracle Management Service version. The following example shows the <ReportDefinition>
tag as defined for a host configuration report.
Example 4-2 <ReportDefinition> Tag for the Host Configuration Report
<ReportDefinition title="Host Configuration Overview" description="Overview of host configuration" system_report="0" category="Sample Host Reports" sub_category="Configuration Reports" show_navigation="1" generate_context="0" add_toc="0" product_name="EM" component_name="oracle_hostsample" is_jit_multi_target="0" target_type="oracle_hostsample" is_jit_target="1" style="BLAF" oms_version="11.1.0.1.0" xmlns="http://www.example.com/DataCenter/ReportDefinition">
Table 4-1 Tag Attributes for the Host Configuration Report
Attribute | Description |
---|---|
title |
report title |
description |
description |
category |
category name |
sub_category |
subcategory name |
target_type |
target type for late binding, or null if not late binding |
add_hoc |
1=show 0=hide table of contents |
show_navigation |
show navigation headers in report (tabs, etc) 1=show, 0=hide |
product_name |
product name, 'EM' (default) |
component_name |
product name. This must be set to the metadata plug-in target type. |
oms_version |
version '11.1' (default) |
<ReportWideParameters parameterName="oracle.sysman.eml.ip.render.elem.TimePeriodParam" parameterValue="0:1"/>
The <ReportElement>
tag is used to add a new report element to an existing report definition.
The <ReportElementParamters
> tag is used to declare the parameters used for a report element. Include all of the report element parameters you want to declare within the <ReportElement>
tag.
Parameters used by some report elements dictate the operational behavior of those elements. Use the <ReportElementParamters>
tag to declare element parameters associated with a <ReportElement>
. The parameter names and values are described in this section for each element type.
This section lists the parameters associated with specific report elements.
The Table Element is used to show a tabular view of query results. The queries must be made against management views.
To declare a Table Element, you would use the following in the <ReportElement>
tag:
<ReportElementParameters element_name_nlsid=" IPMSG_USER_TABLE_FROM_SQL" element_type_ nlsid="IPMSG_ANY_TARGET_TYPE" ………>
Element Name nlsid: IPMSG_USER_TABLE_FROM_SQL
Element Type nlsid: IPMSG_ANY_TARGET_TYPE
Table 4-4 Table Element Parameters Time Period
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TimePeriodParam". |
Required |
No. |
Default Value |
Null. |
Valid Values |
"0:0" for last 24 Hours. "0:1" for last 7 Days. "0:2" for last 31 Days. |
Summary |
Encoded time period. |
Table 4-5 Table Render Sort Column
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.initialSortColumn". |
Required |
No. |
Default Value |
The first column in result set. |
Valid Values |
Any valid column name. |
Summary |
If this parameter is set, the sort column indicator will be shown for the column with this column name. If not set, the sort column indicator is shown on the first column. The SQL query should include an 'order by' clause that sorts by this column. |
Table 4-6 Table Render Sort Order
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.initialSortOrder". |
Required |
No. |
Default Value |
"ascending". |
Valid Values |
"ascending" or "descending". |
Summary |
If this parameter is set, the sort column indicator will be shown either as ascending or descending, according to the value. If not set, the sort column indicator is shown as ascending. |
Table 4-7 Name Value Pair Display
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.nameValueDisplay". |
Required |
No. |
Default Value |
<none>. |
Valid Values |
Positive integer value. |
Summary |
If this parameter is set and only one row is returned from the query, the results are displayed in a vertical list of name-value pairs. This value should be set to the number of name/value columns that should be displayed, normally "1". |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.numRowsToShow". |
Required |
No. |
Default Value |
"10". |
Valid Values |
Positive integer value. |
Summary |
Number of rows to display at one time in the generated table. The user can scroll through additional rows using the UI controls. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.sqlStatementIsPlSql". |
Required |
No. |
Default Value |
"false". |
Valid Values |
"true" or "false" . |
Summary |
Whether a SQL statement is PL/SQL. |
Table 4-10 SQL or PL/SQL Statement
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.sqlStatementIsPlSql". |
Required |
No. |
Default Value |
<None>. |
Valid Values |
Any valid SQL SELECT statement. |
Summary |
SQL statement can optionally bind values for targets, locale information, and start/end date. The format of the SQL statement should include a bind variable placeholders for the options to be bound. Bind Placeholders:
There should be no semi-colon (;) appended to the end of the SQL statement unless it is a PL/SQL statement. |
Example 4-3 Specifying an Anonymous PL/SQL Block as a Parameter to an Element Definition
To avoid issues with formatting, generate the report and export it to XML using the EM CLI.
<ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem.sqlStatement" parameterValue="BEGIN DECLARE

 BEGIN

 open ??EMIP_BIND_RESULTS_CURSOR?? for select 
 bh.created_by "Created by", 
 bh.start_time "Start",
 bh.end_time "End",
 bo.reason "Reason",
 bo.description "Description"
 from 
 MGMT$BLACKOUT_HISTORY bh, 
 MGMT$TARGET tgt,
 MGMT$BLACKOUTS bo
 where tgt.target_name = bh.target_name
 and tgt.target_type = bh.target_type
 and tgt.target_guid = ??EMIP_BIND_TARGET_GUID??
 and bo.blackout_guid = bh.blackout_guid
 order by end_time desc;


 END;
END;"/>
Table 4-11 Named SQL Statement
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.NamedSqlStatement". |
Required |
No. |
Default Value |
<none>. |
Valid Values |
Any valid statement name. |
Summary |
As an alternative to the "oracle.sysman.eml.ip.render.elem.sqlStatement". parameter you may use a Named SQL statement which refers to an actual SQL statement stored in the Enterprise Manager repository. You can register a Named SQL statement by providing an XML file containing the name of the SQL statement as well as the SQL query as part of plug in metadata. For more information, see Section 4.6, "Using the ImportExport.xsd File" for the Named SQL XML file XSD definition. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.maxNumberOfRowsAllowed". |
Required |
No. |
Default Value |
"2000". |
Valid Values |
Any scaler numeric value. |
Summary |
Set the maximum number of rows retrieved for display in the table. For example, show the top 10 xyz's element would set the value to "10". |
Table 4-13 Null Data String Substitute
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.nullDataStringSubstitue". |
Required |
No. |
Default Value |
"" |
Valid Values |
A string. |
Summary |
A string that will be substituted for null values returned. |
Split Table into Multiple Tables by Column
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.nullDataStringSubstitue". |
Parameter String |
"oracle.sysman.eml.ip.render.elem.TableRender.tableSplitColumn". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Any valid column name. |
Summary |
If this parameter is set, the table will be split into separate tables with subheaders as the value in this column changes. The data should be ordered by this column. |
Table 4-15 Column Group Header
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.columnGroupHeader"n. |
Required |
No. |
Default Value |
Null. |
Valid Values |
Header string to use for a column group. |
Summary |
This parameter provides a column header string. This column group header will span columns between the columns specified in "oracle.sysman.eml.ip.render.elem.TableRender.columnGroupStart Col"n and oracle.sysman.eml.ip.render.elem.TableRender.columnGroupEndCol"n. The n suffix is a numeric value starting with 1 for the first column group, sequentially ascending for subsequent column groups. |
Table 4-16 Column Group Start Column
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.columnGroupStartCol"n. |
Required |
No. |
Default Value |
Null. |
Valid Values |
Any valid column name. |
Summary |
Specifies the first column for a given column group. The n suffix is a numeric value starting with 1 for the first column group, sequentially ascending for subsequent column groups. |
Table 4-17 Column Group End Column
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.columnGroupEndCol"n. |
Required |
No. |
Default Value |
Null. |
Valid Values |
Any valid column name. |
Summary |
Specifies the first column for a given column group. The n suffix is a numeric value starting with 1 for the first column group, sequentially ascending for subsequent column groups. |
Use Separate Rows for Values within a Cell
Table 4-18 Use Separate Rows for Values Within a Cell
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.useSeparateRowsColumns". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Comma separated list of valid column names. |
Summary |
If this parameter is set, the delimited values of the column with the given name specified will be displayed on separate rows within a containing row cell. More than one column can be designated for this treatment by adding comma-separated column names. |
Use Separate Rows as Delimiters
Table 4-19 Use Separate Rows as Delimiters
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.useSeparateRowsDelimiter". |
Required |
No. |
Default Value |
, (comma). |
Valid Values |
Any string. |
Summary |
A character used to delimit tokens within a string. |
Table 4-20 Severity Icon in Column
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.severityColumn". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Any valid column names. |
Summary |
A severity icon will be substituted for valid severity values returned. To omit an icon, your result set can contain null values in this column. |
Availability Status Icon in Column
Table 4-21 Availability Status Icon in Column
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.availabilityStatusColumn". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Any valid column names. |
Summary |
An availability status icon will be substituted for valid values returned. To omit an icon your result set can contains null values in this column. |
Table 4-22 Render Image in Column
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.imageFilenameColumns". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Comma separated list of column names. |
Summary |
Optional parameter to display the given image filename in the indicated columns. Indicate for which columns the given image should be rendered. Specify a comma separated list of column names. The image filename returned should contain a relative path starting with '/images' such as '/images/xyz.gif'. Normally, a SQL decode function would be used to translate a numeric value into the appropriate image filename. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.targetTypeColumns". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Comma separated list of column names. |
Summary |
Optional parameter to indicate for which columns the value returned should be used as an internal target type to be translated into a display string for that type. Specify a comma separated list of column names. |
The following table elements are used to create search filters that allows users to filter on rows for multiple table columns. Three different filter types are permitted:
text-value
list of values obtained from a SQL query
list of values obtained from a comma-separated list in the element definition
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterNames". |
Required |
Yes. |
Default Value |
Null. |
Valid Values |
Comma separated list of filter names. |
Summary |
Defines filter names in a comma-separated list. This parameter also defines the ordering of filter elements. |
Table 4-25 Define Filter Prompt
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterPrompt<name>Filter". |
Required |
Yes. |
Default Value |
Null. |
Valid Values |
CF. |
Summary |
Defines the prompt used in the Reports page for the filter name. The filter value is accessed from the report element's SQL statement via ??EMIP_BIND_PARAM<name>??. Without any other filter-related parameters, this defines a filter which allows the user to provide a value via a text input field. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterSql<name>". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Any valid SQL SELECT statement. |
Summary |
Defines the SQL query used to populate a list of values for a filter name that is presented in the UI as a drill-down menu instead of the text input field. |
Table 4-27 List of Filter Names
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterList<name>". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Comma separated list of values. |
Summary |
Defines a list of values for a filter name which is displayed in the UI as a drill-down menu. |
Translate List of Filter Names
Table 4-28 Translate List of Filter Names
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterTranslateValues<name>". |
Required |
No. |
Default Value |
No. |
Valid Values |
yes or no. |
Summary |
Defines whether the values provided by filterSql or filterList should be translated to the client locale. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterTip<name>Filter". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Alpha numeric text. |
Summary |
Defines the text for a tool tip shown if the user moves the mouse over the filter UI elements. |
Table 4-30 Default Filter Name
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterDefault<name>". |
Required |
No. |
Default Value |
%. |
Valid Values |
Alpha numeric text string. |
Summary |
Defines a default value for filter name. If no default value is given, '%' is used instead. |
Table 4-31 Null Default Filter Name
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterDefaultsToNull<name>". |
Required |
No. |
Default Value |
Null. |
Valid Values |
yes or no. |
Summary |
When this defines the default value to be NULL instead of '%'. |
The following parameters act globally on the filter system.
Table 4-32 Display Empty Table
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterStartEmpty". |
Required |
No. |
Valid Values |
yes or no. |
Summary |
If the value of this parameter is 'yes', then the report initially displays an empty table. The table is populated when the user clicks on the filter button in the UI. |
Table 4-33 Empty Table Headers
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterEmptyTableHeaders". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Comma-separated list of table headers. |
Summary |
Defines the table headers used when starting with an empty table. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterEmptyTableHeaderTypes". |
Required |
No. |
Default Value |
VARCHAR. |
Valid Values |
Comma-separated list of table headers. |
Summary |
This defines the table header types (column types) used if when starting with an empty table. This is a comma-separated list. If no header types are specified, the table header types default to VARCHAR. |
Table 4-35 Overwrite Table Header Text
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterHeaderText". |
Required |
No. |
Default Value |
Search Filter. |
Valid Values |
Comma separated list of column names. |
Summary |
Overwrites the default filter section header text. |
Overwrite Default Filter Description
Table 4-36 Overwrite Default Filter Description
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterDescriptionText". |
Required |
No. |
Default Value |
Enter values to filter what is shown in the table. |
Valid Values |
Alpha numeric text string. |
Summary |
Overwrites the default filter section header text. |
Overwrite Default Filter Tip Text
Table 4-37 Overwrite Default Filter Tip Text
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterTipText". |
Required |
No. |
Default Value |
The search filter is case sensitive. Use '%' as a wildcard. |
Valid Values |
Alpha numeric text string. |
Summary |
Overwrites the default filter section tip text. |
Table 4-38 Overwrite Default Button Text
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterButtonText". |
Required |
No. |
Default Value |
OK. |
Valid Values |
Alpha numeric text string. |
Summary |
Overwrites the default filter button text. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.filterEmptyTableText". |
Required |
No. |
Default Value |
(No rows returned). |
Valid Values |
Alpha numeric text string. |
Summary |
Specifies the text to be shown in an empty table before the filter is run. |
The following parameters are used to implement hyperlinks within tables and incorporate improved link navigation between master/detail views. This method is an alternative to using oracle.sysman.eml.ip.render.elem.TableRender.columnDestReportTitle<num>, which first takes the user to the target selector page.
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.columnDestHomepageReportTitle<num>". |
Required |
No. |
Default Value |
Null. |
Valid Values |
Report definition link. |
Summary |
Same as oracle.sysman.eml.ip.render.elem.TableRender.columnDestReportTitle<num> except that a link to a report definition on the target homepage is created. |
Table 4-41 Display Number of Columns
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.numberOfColumnsShowed". |
Required |
No. |
Default Value |
Number of columns in the SQL. |
Valid Values |
Number. |
Summary |
Defines the number of columns from the element SQL to be displayed in the UI. Additional columns from the SQL query are hidden but can be used to create the hyperlinks to expose data in the detail report. |
Table 4-42 Display Target Name
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.columnDestTargetIndex<num>". |
Required |
No. |
Default Value |
Null. |
Summary |
Specifies the column (which may be hidden) that contains the target name. The target name is used in the link to populate the target selection on late binding reports. |
Table 4-43 Display Target Type
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.columnDestTypeIndex<num>". |
Required |
No. |
Default Value |
Null. |
Summary |
Specifies the column (which may be hidden) that contains the target type. The target type is used in the link to populate the target selection on late binding reports. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TableRender.columnDestURLIndex<num>". |
Required |
No. |
Default Value |
Null. |
Summary |
Specifies the column (which may be hidden) that contains an arbitrary URL for a given table element. |
Example 4-4 Report definition defining a master report that allows you to drill down using a link to a detail report
<?xml version = '1.0' encoding = 'UTF-8'?> <ReportDefinition title="My Master Report" description= "A master report to show master/detail" system_report="0" category="Test Reports" sub_category="Master and Detail" show_navigation="1" generate_context="0" add_toc="1" product_name="EM" component_name="SAMPLE" is_jit_multi_target="0" is_jit_target="0" style="BLAF" oms_version="11.2.0.1.0" xmlns="http://www.example.com/DataCenter/ReportDefinition"> <ReportElement element_row="1" suppress_render="0" element_name_nlsid="IPMSG_USER_ TABLE_FROM_SQL" header_nlsid="My Master Report Table" element_type_nlsid="IPMSG_ANY_TARGET_TYPE" element_order="0"> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render. elem.TableRender.filterEmptyTableHeaders" parameterValue= "Target Name, Target Type"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.columnDestParamColumnIndexes1" parameterValue="0,1"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterHeaderText" parameterValue="My Filter Header"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterDescriptionText" parameterValue="My Filter description"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip. render.elem.sqlStatement" parameterValue="SELECT TARGET_NAME "Target Name", TARGET_TYPE "Target Type" FROM MGMT$TARGET WHERE TARGET_NAME LIKE ??EMIP_BIND_PARAMNAME?? AND TARGET_TYPE LIKE ??EMIP_BIND_PARAMTYPE??"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterPromptNAME" parameterValue="Name"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render. elem.TableRender.filterSqlTYPE" parameterValue= "select distinct target_type from mgmt$target"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterStartEmpty" parameterValue="yes"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterTipTYPE" parameterValue="Filter on the target types"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterPromptTYPE" parameterValue="Target Type"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterTipText" parameterValue="My Tip Text"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterNames" parameterValue="NAME,TYPE"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.numberOfColumnsShowed" parameterValue="2"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.columnDestReportTitle1" parameterValue="My Detail Report"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterTipNAME" parameterValue="Filter on the target names"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem. TableRender.filterButtonText" parameterValue="My button text"/> </ReportElement> </ReportDefinition> <?xml version = '1.0' encoding = 'UTF-8'?> <ReportDefinition title="My Detail Report" system_report="0" category="Test Reports" sub_category="Master and Detail" show_navigation="1" generate_context="0" add_toc="0" product_name="EM" is_jit_multi_target="0" is_jit_target="0" style="BLAF" oms_version="11.2.0.1.0" xmlns="http://www.example.com/DataCenter/ReportDefinition"> <ReportElement element_row="1" suppress_render="0" element_name_nlsid="IPMSG_USER_TABLE_FROM_SQL" element_type_nlsid="IPMSG_ANY_ TARGET_TYPE" element_order="0"> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem.headerParam" parameterValue="Target Detail"/> <ReportElementParameters parameterName="oracle.sysman.eml.ip.render.elem.sqlStatement" parameterValue="SELECT TARGET_NAME "Target Name", TYPE_VERSION "Version" FROM MGMT$TARGET WHERE TARGET_TYPE LIKE ??EMIP_BIND_PARAM2?? AND TARGET_NAME LIKE ??EMIP_BIND_PARAM1??"/> </ReportElement> </ReportDefinition>
The Chart Element is used to show a graphical view of query results. The queries must be made against Management Repository views.
Element Name: IPMSG_USER_CHART_FROM_SQL
Element Type: IPMSG_ANY_TARGET_TYPE
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.chartType". |
Required |
No. |
Default Value |
"pie chart". |
Valid Values |
"barChart", "lineChart", "pieChart", "timeSeriesChart", and "timeSeriesBarChart". |
Summary |
Chart type to display. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TimePeriodParam". |
Required |
No. |
Default Value |
Null. |
Valid Values |
"0:0" for last 24 Hours."0:1" for last 7 Days."0:2" for last 31 Days. |
Summary |
Encoded time period. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.fill". |
Required |
No. |
Default Value |
"none". |
Valid Values |
"none", "absolute", or "cumulative". |
Summary |
Indicates if a line chart should fill the area under the lines. "none": no fill under lines."absolute": lines are identical to "none" setting but with the area under the lines filled."cumulative": causes the values for the lines to be added or stacked, then the areas underneath the lines are filled.Use caution when using the fill attribute to ensure there is no confusion for the report user as to whether the data in the chart is cumulative or absolute. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.height". |
Required |
No. |
Default Value |
"200". |
Valid Values |
n, where n is any String that will correctly parse to a positive integer. |
Summary |
Sets the display height of the chart in pixels. |
Table 4-49 Horizontal or Vertical
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.visualOrientation". |
Required |
No. |
Default Value |
"horizontal". |
Valid Values |
"horizontal" or "vertical". |
Summary |
Visual orientation of the chart. This attribute is only valid with the chartType attribute set to barChart or timeSeriesChart. The attribute does not affect the pieChart. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.legendPosition". |
Required |
No. |
Default Value |
"east". |
Valid Values |
"default", "east", "south". |
Summary |
Specifies where the legend should be placed relative to the chart. |
Table 4-51 Is PL/SQL Statement
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.sqlStatementIsPlSql". |
Required |
No. |
Default Value |
"false". |
Valid Values |
"true" or "false". |
Summary |
Set to "true" to indicate that the SQL statement is a PL/SQL statement. |
Table 4-52 SQL or PL/SQL Statement
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.sqlStatement". |
Required |
No. |
Default Value |
<none>. |
Valid Values |
Any valid SQL SELECT statement or PL/SQL block. |
Summary |
SQL or PL/SQL statement can optionally bind values for targets, locale information, and start/end date. The format of the statement should include a bind variable placeholders for the options to be bound. Bind Placeholders:
There should be no semi-colon (;) appended to the end of the SQL statement unless it is a PL/SQL statement. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.stacked". |
Required |
No. |
Default Value |
"false". |
Valid Values |
"true" or "false". |
Summary |
Indicates if a bar chart should be stacked. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.title". |
Required |
No. |
Default Value |
<none>. |
Summary |
Chart title to identify chart for Americans with Disabilities Act compliance. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.width". |
Required |
No. |
Default Value |
"400". |
Valid Values |
n, where n is any String that will correctly parse to a positive integer. |
Summary |
Specifies the display width of the element in pixels. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.yAxisLabel". |
Required |
No. |
Default Value |
<none>. |
Valid Values |
String. |
Summary |
If this parameter is supplied, it is used as the y-axis label for charts that have an y-axis. |
Table 4-57 Slices as Percentage
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.pieShowSlicePercentLab els". |
Required |
No. |
Default Value |
<none>. |
Valid Values |
"true" or "false". |
Summary |
If this parameter is supplied, it controls whether each slice is labeled with a percentage value. This attribute is ignored for chartTypes other than pieChart. |
Table 4-58 Show Values in Legend
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.ChartParamController.pieValuesInLegend". |
Required |
No. |
Default Value |
"value". |
Valid Values |
"percent", "value" or "none". |
Summary |
For pie charts, this parameter specifies whether values for pie slices are included in the legend along with the label for the pie slice. The default value for this attributes is "value". If specified as either "percent" or "value" then the numeric value is displayed along with the pie slice label in the form, "pie slice label (numeric value)". If "percent" is specified, then the percentage out of the total of all slice values is calculated and displayed, otherwise, the raw value of the slice is displayed. To omit a value in the legend, specify "none" as a value for this parameter. This attribute is ignored for chartTypes other than pieChart. |
To declare a Metric Details Element, you would use the following in the ReportElement
tag:
<ReportElementParameters element_name_nlsid=" IPMSG_METRIC_DETAILS" element_type_ nlsid="IPMSG_ANY_TARGET_TYPE" ………>
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.MetDetInternalTargetType". |
Required |
No. |
Default Value |
"oracle_database". |
Valid Values |
Any valid internal target type name. |
Summary |
The type of target to be shown in the graph. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.MetDetSelectedMetric". |
Required |
Yes. |
Valid Values |
Valid metric name according to target type selected. |
Summary |
Metric to be graphed. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.MetDetSelectedMetricColumn". |
Required |
Yes. |
Valid Values |
Valid column name according to the metric and target type selected. |
Summary |
Column of metric to be graphed. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TimePeriodParam". |
Required |
No. |
Default Value |
null. |
Valid Values |
"0:0" for last 24 Hours."0:1" for last 7 Days."0:2" for last 31 Days. |
Summary |
Encoded time period. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.MetDetWidth". |
Required |
No. |
Default Value |
300. |
Valid Values |
n, where n is any String that will correctly parse to a positive integer. |
Summary |
Width of the image in pixels. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.MetDetHeight". |
Required |
No. |
Default Value |
300. |
Valid Values |
n, where n is any String that will correctly parse to a positive integer. |
Summary |
Height of the image in pixels. |
The Text Element is used to display any message text you wish to provide for your report. n To declare a Text Element, you would use the following in the ReportElement
tag:
<ReportElementParameters element_name_nlsid="IPMSG_STYLED_TEXT" element_type_ nlsid="IPMSG_ANY_TARGET_TYPE" ………>
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TextParamBean.textMessage". |
Required |
No. |
Default Value |
"" (empty String). |
Valid Values |
Any Message. |
Summary |
Set the message to display in the report. |
Attribute | Description |
---|---|
Parameter Name |
"oracle.sysman.eml.ip.render.elem.TextParamBean.textStyleClass". |
Required |
No. |
Default Value |
"OraInstructionText". |
Valid Values |
"OraInstructionText"."OraTipText". |
Summary |
Specifies the style class for the message text to adopt when displayed. |
The following parameters apply to all reporting elements within the report definition.
You can provide a dynamic time period selector for your report definition that allows the report user to choose a specific time period with which to view the report.
If you are using Table from SQL or Chart from SQL report elements, you can structure your SQL statement such that the start and end dates will be bound automatically for you by Information Publisher. You achieve this by inserting placeholders (for example, ??EMIP_BIND_START_DATE??
) for the start and end date values as shown in Example 4-5.
Example 4-5 Automatic Binding of Start and End Dates
'SELECT COLUMN_LABEL, ROLLUP_TIMESTAMP, AVERAGE FROM MGMT$METRIC_HOURLY WHERE TARGET_GUID = ??EMIP_BIND_TARGET_GUID?? AND METRIC_LABEL = ''Load'' AND KEY_VALUE = '' '' AND ROLLUP_TIMESTAMP > ??EMIP_BIND_START_DATE?? AND ROLLUP_TIMESTAMP < ??EMIP_BIND_END_DATE?? ORDER BY ROLLUP_TIMESTAMP'
See the online help documentation for Table from SQL or Chart from SQL for detailed information.
The Information Publisher ImportExport.xsd file describes the format of the report definition XML file. A sample NamedSql.xsd file is also shown in Example 4-7.
Example 4-6 Information Publisher ImportExport.xsd
<xsd:schema targetNamespace="http://www.example.com/DataCenter/ReportDefinition" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ms="http://www.example.com/DataCenter/ReportDefinition" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:annotation> <xsd:documentation> <strong>This is the schema definition, used by metadata services and the report import cli. It is used to fully specify a report definiton</strong> </xsd:documentation> </xsd:annotation> <!-- ****************************** --> <!-- Main Element: ReportDefinition --> <!-- ****************************** --> <xsd:element name="ReportDefinition" type="ms:ReportDefinitionT"/> <!-- Defining Common Types used in a Report Definition --> <!-- ***************** --> <!-- ReportDefinitionT --> <!-- ***************** --> <!-- Documentation: ReportDefinitionT is type for main root element. All the Report Definitions should validate to this type. --> <xsd:complexType name="ReportDefinitionT"> <xsd:sequence> <xsd:element name="ReportWideParameters" type="ms:ReportWideParametersT" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="ReportElement" type="ms:ReportElementT" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="title" type="ms:String100Def" use="required"/> <xsd:attribute name="description" type="ms:String500Def"/> <xsd:attribute name="system_report" type="ms:BooleanDef" default="0"/> <xsd:attribute name="category" type="ms:String100Def" use="required"/> <xsd:attribute name="sub_category" type="ms:String100Def" use="required"/> <xsd:attribute name="target_type" type="ms:String64Def"/> <xsd:attribute name="is_jit_target" type="ms:BooleanDef" default="1"/> <xsd:attribute name="is_jit_multi_target" type="ms:BooleanDef" default="0"/> <xsd:attribute name="add_toc" type="ms:BooleanDef" default="0"/> <xsd:attribute name="pack_name" type="ms:String64Def"/> <xsd:attribute name="style" type="ms:String64Def" default="BLAF"/> <xsd:attribute name="show_navigation" type="ms:BooleanDef" default="1"/> <xsd:attribute name="product_name" type="ms:String100Def" default="EM"/> <xsd:attribute name="component_name" type="ms:String100Def"/> <xsd:attribute name="generate_context" type="ms:BooleanDef" default="0"/> <xsd:attribute name="oms_version" type="ms:NameDef" use="required"/> </xsd:complexType> <xsd:complexType name="ReportElementT"> <xsd:sequence> <xsd:element name="ReportElementParameters" type="ms:ReportElementParametersT" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="element_name_nlsid" type="ms:String256Def" use="required"/> <xsd:attribute name="element_type_nlsid" type="ms:String100Def" use="required"/> <xsd:attribute name="header_nlsid" type="ms:String100Def"/> <xsd:attribute name="element_order" type="xsd:integer"/> <xsd:attribute name="element_row" type="xsd:integer"/> <xsd:attribute name="suppress_render" type="ms:BooleanDef"/> </xsd:complexType> <xsd:complexType name="ReportElementParametersT"> <xsd:attribute name="parameterName" type="ms:String100Def" use="required"/> <!-- parameterValue is in CDATA, but schema definition makes no distinction between this and string attribute. Therefore, don't specify any contstraints on the attribute, thereby allowing it to be unbouned in length. --> <xsd:attribute name="parameterValue" type="xsd:string" use="required"/> </xsd:complexType> <xsd:complexType name="ReportWideParametersT"> <xsd:attribute name="parameterName" type="ms:String100Def" use="required"/> <!-- parameterValue is in CDATA, but schema definition makes no distinction between this and string attribute. Therefore, don't specify any contstraints on the attribute, thereby allowing it to be unbouned in length. --> <xsd:attribute name="parameterValue" type="xsd:string" use="required"/> </xsd:complexType> <xsd:simpleType name="String64Def"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1"/> <xsd:maxLength value="64"/> <xsd:whiteSpace value="preserve"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="String100Def"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1"/> <xsd:maxLength value="100"/> <xsd:whiteSpace value="preserve"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="String500Def"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1"/> <xsd:maxLength value="500"/> <xsd:whiteSpace value="preserve"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="String256Def"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1"/> <xsd:maxLength value="256"/> <xsd:whiteSpace value="preserve"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="BooleanDef"> <xsd:restriction base="xsd:integer"> <xsd:enumeration value="0"/> <xsd:enumeration value="1"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="NameDef"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1"/> <xsd:maxLength value="64"/> </xsd:restriction> </xsd:simpleType> </xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ms="http://www.example.com/DataCenter/NamedSQL" targetNamespace="http://www.example.com/DataCenter/NamedSQL" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:annotation> <xsd:documentation> <strong>This is the schema definition, used by metadata services. It is used to fully specify a list of named sql that can be used in report definitions</strong> </xsd:documentation> </xsd:annotation> <xsd:element name="NamedSQLStatements"> <xsd:complexType> <xsd:sequence> <xsd:element name="NamedSQL" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:attribute name="sqlName" type="xsd:string"/> <xsd:attribute name="sqlValue" type="xsd:string"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
The following EM CLI verbs are used exclusively for report definition creation and administration.
emcli get_reports [-owner="<report-owner>"] Description: This verb returns a list of reports owned by or viewable by the user logged into the cli. Options: -owner The optional argument allows listing of viewable reports owned by a specific EM user. Output: The output of this report will be space separated quoted strings for the report title and owner with each report on it own line. emcli export_report -title="<report-title>" -owner="<report-owner>" -output_file="<file>" Description: This verb exports a report definition and all its element definitions given its title and owner. Options: -title The title of the report to export. -owner The owner of the report to export. The logged-in emcli user must have view privliege for the report. Target names will not be exported. The report is uniquely defined using title/owner so both must be supplied. -output_file The name of the exported file. Examples: emcli export_report \ -title="maintenance report" \ -owner="SHIFT1_OPERATOR" \ -output_file="$HOME/reports/maint_report.xml" emcli import_report [-force] -files="file1;file2;..." Description: This verb imports a report definition from a XML file using the title in the xml file and the currently logged-in cli user as the owner of the report. If the report/owner already exists, the operation fails for that report with an appropriate error message. The report will be changed to a just-in-time report with the target type from the exported report. In addition, schedules and access privileges will need to be edited using the UI. The system enforces title/owner uniqueness, so an error will be thrown if there is already a report with the same title and owner. Options: -force If report with same title/owner exists, first delete it (and all jobs and saved copies) -files List of Path/file name(s) of XML file(s), which contains valid Report definition(s). Examples: emcli import_report \ -files="$HOME/reports/maint_report1.xml;$HOME/reports/file2.xml"
Oracle recommends adhering to the following guidelines when defining a report definition file:
The Component Name Must be Set to the Target Type
The component name must be set to the target type in order for Enterprise Manager to associate specific report definitions with a particular metadata plug-in. For example,
<ReportDefinition component_name="oracle_orgchart" … …
When Using Chart from SQL and Table from SQL Elements
If your element accepts a single non-aggregate target (only), which is the case for most metadata plug-in target types, you can take advantage of automatic time zone date adjustment built into the Chart from SQL and Table from SQL elements by setting the oracle.sysman.eml.ip.render.elem.adjustTimes
parameter on your element to 'true'
. When this parameter is set, the start and end dates bound to your SQL query will be adjusted from the report time zone to the target time zone. Conversely, dates returned from the query will be adjusted from the target time zone to the report time zone.
If your element accepts multiple targets or aggregate targets, you are responsible for handling time zone adjustment for your date values. You can obtain the report time zone from the ??EMIP_BIND_TIMEZONE_REGION??
bind variable. In order for the report viewer to understand the dates shown, dates displayed in a report must either conform to the report time zone or explicitly display the time zone associated with each date. The following examples illustrate common use cases.
Example 4-9 Adjusting a Date Returned in your Select Statement from the Time Zone of a Given Target to the Report Time Zone
select mgmt_view_util.adjust_tz(tbl.date, tgt.timezone_region, ??EMIP_BIND_TIMEZONE_REGION??)
from mgmt$target tgt, sometable tbl
where <your where clause here>
Example 4-10 Adjusting a Report Time Period Start and End Dates Used in the WHERE Clause of Your SELECT Statement from the Report Time Zone to your Targets Time Zone
select <your selected columns here>
from mgmt$target tgt, sometable tbl
where
tgt.target_guid = ??EMIP_BIND_TARGET_GUID?? and
tbl.Mydate > MGMT_VIEW_UTIL.ADJUST_TZ(
??EMIP_BIND_START_DATE??,
??EMIP_BIND_TIMEZONE_REGION??,
tgt.TIMEZONE_REGION)
and
tbl.Mydate < MGMT_VIEW_UTIL.ADJUST_TZ(
??EMIP_BIND_END_DATE??,
??EMIP_BIND_TIMEZONE_REGION??,
tgt.TIMEZONE_REGION)