Skip Headers
Oracle® Enterprise Manager Cloud Control Extensibility Programmer's Reference
12c Release 3 (12.1.0.3)

E25161-12
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

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

5 Adding Information Publisher Reports

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:

5.1 Introduction to Adding Information Publisher Reports

As an plug-in developer, you are responsible for the following steps with regard to adding information publisher reports:

  1. Design your reports based on the information you wish to show.

  2. Create your report definition file

    1. 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.

    2. Create a test report interactively from the Enterprise Manager console

      For more information, see Creating a Test Report Interactively from the Enterprise Manager Console.

    3. Use EM CLI to generate the report definition file

      For more information, see Using EM CLI to Generate the Report Definition File.

5.1.1 Assumptions and Prerequisites

This chapter assumes you are familiar with the following:

  • EM repository views against which you can write your own queries.

  • Familiarity with the XML file format which you will use to create your report definition.

5.2 Overview of SYSTEM Reports

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.

5.2.1 About the Report Definitions 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.

5.3 Understanding the Report Definition File

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.

5.4 Creating a 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.

5.4.1 About the Report Definition File Development Process

The process of developing a valid report definition file involves three steps:

  1. Defining SQL or PL/SQL Queries

  2. Creating a Test Report Interactively from the Enterprise Manager Console

  3. Using EM CLI to Generate the Report Definition File

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 5-1 shows the content of the report definition file for a report detailing host configuration.

Example 5-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   
        &quot;CPU Utilization (%)&quot; &#xA;
        from mgmt$metric_current where &#xA;         
        target_guid = ??EMIP_BIND_TARGET_GUID??&#xA; 
        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  
        &quot;Memory Utilization (KB)&quot;&#xA;
        from mgmt$metric_current where &#xA;
        target_guid = ??EMIP_BIND_TARGET_GUID??&#xA;
        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> 

5.4.2 About the Report Lifecycle: Updating Report Definitions

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.

5.5 Understanding the XML Report Definition Interface

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.

5.5.1 About Report Definition Tags

Use the following XML tags to define and manipulate report information when creating report definition files.

5.5.1.1 <ReportDefinition>

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 5-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">

Tag Attributes

Table 5-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)


Report-wide Parameters

<ReportWideParameters          parameterName="oracle.sysman.eml.ip.render.elem.TimePeriodParam"          parameterValue="0:1"/>

5.5.1.2 <ReportElement>

The <ReportElement> tag is used to add a new report element to an existing report definition.

Input

Table 5-2 <ReportElement> Tag

Parameter Description

element_type_nlsid

The element type name.

header_nlsid

The element header or null.

element_order

The order of this element, 1 based.

element_row

The row for this element, 1 based.


5.5.1.3 <ReportElementParamters>

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.

Table 5-3 <ReportElementParameters> Tag

Parameter Description

parameterName

The parameter name.

parameterValue

The parameter value.


5.5.2 Using Element Parameters

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.

5.5.2.1 About Table Element Parameters

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

Time Period

Table 5-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.


Sort Column

Table 5-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.


Sort Order

Table 5-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.


Name Value Pair Display

Table 5-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".


Number of Rows to Show

Table 5-8 Number of Rows

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.


Is PL/SQL Statement

Table 5-9 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

Whether a SQL statement is PL/SQL.


SQL or PL/SQL Statement

Table 5-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:

  • ??EMIP_BIND_RESULTS_CURSOR??

    For use with PL/SQL statement to bind a return cursor containing results for display.

  • ??EMIP_BIND_TARGET_GUID??

    For use with SQL or PL/SQL to bind a target GUID.

  • ??EMIP_BIND_START_DATE??

    For use with SQL or PL/SQL to bind a start date.

  • ??EMIP_BIND_END_DATE??

    For use with SQL or PL/SQL to bind an end date.

  • ??EMIP_BIND_TIMEZONE_REGION??

    For use with SQL or PL/SQL to bind a time zone region.

  • ??EMIP_BIND_LOCALE_COUNTRY??

    For use with SQL or PL/SQL to bind a locale country.

  • ??EMIP_BIND_LOCALE_LANGUAGE??

    For use with SQL or PL/SQL to bind a locale language.

There should be no semi-colon (;) appended to the end of the SQL statement unless it is a PL/SQL statement.


Example 5-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&#xA;&#xA; BEGIN&#xA;&#xA; 
open ??EMIP_BIND_RESULTS_CURSOR?? for select &#xA; 
bh.created_by &quot;Created by&quot;, &#xA; bh.start_time &quot;Start&quot;,&#xA; bh.end_time &quot;End&quot;,&#xA; bo.reason &quot;Reason&quot;,&#xA; bo.description &quot;Description&quot;&#xA; from &#xA; MGMT$BLACKOUT_HISTORY bh, &#xA; MGMT$TARGET tgt,&#xA; MGMT$BLACKOUTS bo&#xA; 
where tgt.target_name = bh.target_name&#xA; and tgt.target_type = bh.target_type&#xA; and tgt.target_guid = ??EMIP_BIND_TARGET_GUID??&#xA; and bo.blackout_guid = bh.blackout_guid&#xA; 
order by end_time desc;&#xA;&#xA;&#xA; END;&#xA;END;"/>

Named SQL Statement

Table 5-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 5.6, "Using the ImportExport.xsd File" for the Named SQL XML file XSD definition.


Maximum Number of Rows

Table 5-12 Number of Rows

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".


Null Data String Substitute

Table 5-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

Table 5-14 Split Table

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.


Column Group Header

Table 5-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.


Column Group Start Column

Table 5-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.


Column Group End Column

Table 5-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 5-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 5-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.


Severity Icon in Column

Table 5-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 5-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.


Render Image in Column

Table 5-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.


Target Type Column

Table 5-23 Target Type Column

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.


5.5.2.1.1 About Filter Elements

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

Define Filter Name

Table 5-24 Define Filter Name

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.


Define Filter Prompt

Table 5-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.


SQL Filter

Table 5-26 SQL Filter

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.


List of Filter Names

Table 5-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 5-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.


Filter Tip Text

Table 5-29 Filter Tip Text

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.


Default Filter Name

Table 5-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.


Null Default Filter Name

Table 5-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 '%'.


Global Filter Elements

The following parameters act globally on the filter system.

Display Empty Table

Table 5-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.


Empty Table Headers

Table 5-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.


Table Header Type

Table 5-34 Table Header Type

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.


Overwrite Table Header Text

Table 5-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 5-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 5-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.


Overwrite Default Button Text

Table 5-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.


Empty Table Text

Table 5-39 Empty Table 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.


5.5.2.1.2 Using Hyperlinks Within Tables

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.

Link to Report

Table 5-40 Link to Report

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.


Display Number of Columns

Table 5-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.


Display Target Name

Table 5-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.


Display Target Type

Table 5-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.


Display URL

Table 5-44 Display URL

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 5-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 &quot;Target    
    Name&quot;, TARGET_TYPE &quot;Target Type&quot; 
    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 &quot;Target Name&quot;, 
       TYPE_VERSION &quot;Version&quot; 
       FROM MGMT$TARGET 
       WHERE TARGET_TYPE LIKE ??EMIP_BIND_PARAM2?? 
       AND TARGET_NAME LIKE ??EMIP_BIND_PARAM1??"/>
   </ReportElement>
</ReportDefinition>

5.5.2.2 About the Chart Element

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

Chart Type

Table 5-45 Chart 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.


Time Period

Table 5-46 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.


Fill

Table 5-47 Fill

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.


Height

Table 5-48 Height

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.


Horizontal or Vertical

Table 5-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.


Legend Position

Table 5-50 Legend Position

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.


Is PL/SQL Statement

Table 5-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.


SQL or PL/SQL Statement

Table 5-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:

  • ??EMIP_BIND_RESULTS_CURSOR??

    For use with PL/SQL statement to bind a return cursor containing results for display.

  • ??EMIP_BIND_TARGET_GUID??

    For use with SQL or PL/SQL to bind a target GUID.

  • ??EMIP_BIND_START_DATE??

    For use with SQL or PL/SQL to bind a start date.

  • ??EMIP_BIND_END_DATE??

    For use with SQL or PL/SQL to bind an end date.

  • ??EMIP_BIND_LOCALE_COUNTRY??

    For use with SQL or PL/SQL to bind a locale country.

  • ??EMIP_BIND_LOCALE_LANGUAGE??

    For use with SQL or PL/SQL to bind a locale language.

There should be no semi-colon (;) appended to the end of the SQL statement unless it is a PL/SQL statement.


Stacked Bar Chart

Table 5-53 Stacked Bar Chart

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.


Chart Title

Table 5-54 Chart Title

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.


Width

Table 5-55 Width

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.


Y-Axis Label

Table 5-56 Y-Axis Label

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.


Slices as Percentage

Table 5-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.


Show Values in Legend

Table 5-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.


5.5.3 Understanding the Metric Details Element

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" ………>

Target Type

Table 5-59 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.


Metric Name

Table 5-60 Metric Name

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.


Metric Column Name

Table 5-61 Metric Column Name

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.


Time Period

Table 5-62 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.


Width

Table 5-63 Width

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.


Height

Table 5-64 Height

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.


Legend Position

Table 5-65 Legend Position

Attribute Description

Parameter Name

"oracle.sysman.eml.ip.render.elem.MetDetLegendPosition".

Required

No.

Valid Values

"south" (default), "east".

Summary

Position of the legend relative to the chart.


5.5.4 Using Text Element Parameters

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" ………>

Message Text

Table 5-66 Message Text

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.


Message Style

Table 5-67 Message Style

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.


Link Destination

Table 5-68 Link Destination

Attribute Description

Parameter Name

"ooracle.sysmn.eml.ip.render.elem.TextParamBean.textDestination".

Required

No.

Default Value

None.

Valid Values

Any URI.

Summary

Specifies an optional link destination for this text element.


5.5.5 About Report-Wide Parameters

The following parameters apply to all reporting elements within the report definition.

Dynamic Time Selector

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 5-5.

Example 5-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.

5.6 Using the ImportExport.xsd File

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 5-7.

Example 5-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>

Example 5-7 NamedSQL.xsd

<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>

5.7 About Enterprise Manager Command Line Interface (EM CLI) Verbs

The following EM CLI verbs are used exclusively for report definition creation and administration.

Example 5-8 EM CLI Verbs

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"

5.8 About Development Guidelines

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 5-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 5-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)