<rw:graph>
The rw:graph
tag requires a data source and must be enclosed in
the rw:report
tags.The tag body is required
and evaluated. It contains the XML definition of a graph. Note that columns
specified in groups
, series
, and dataValues
,
as well as columns referenced in graphHyperlink
, must belong to
the data source group specified by src
, or its parent groups.
Graph images are not created in the same place for Reports Builder and the
Reports Server. In Reports Builder, a .gif
file is created in the
REPORTS_TMP
directory. For the Reports Server, the image file is created in the server cache
directory, and handled by the server as part of the report output.
With Oracle Reports 10g Release 2 (10.1.2), you can specify the dateSortOrder
attribute to sort the date
data type in graphs along the X-axis.
You can sort in either ascending or decending order. If the dates are repeated,
all such dates are displayed next to each other, rather than displaying as a
single value on the X-axis. Equal spacing is maintained between any two values.
If unequal gaps are present between the actual dates (for example, 1-JAN-2000,
1-FEB-2000, and 1-APR-2000) the output displays these values with equal spacing,
though there are gaps of 1 and 2 months, respectively, between them. Note:
When you specify dates in your graphs, the date values may display in a different
format in a graph than in other fields in your report output.
To customize your graph XML definition beyond the scope of the attributes set
with the Graph Wizard, you can directly edit the graph XML. For paper-based
reports, you can edit the rw:graph
tag in the Graph
Settings property in the graph object's Property Inspector. For JSP-based
Web reports, you edit the rw:graph
tag in the Web Source view.
The full list of attributes available is defined in the DTD file, graph.dtd
.
Note: The graph.dtd
is available in the following
locations:
ORACLE_HOME\jlib\bigraphbean.jar
http://www.oracle.com/technology/products/reports/index.html
),
click Getting Started to display the Getting Started with
Oracle Reports home page. In the list of topic sections on the left, click
Index. In the Collateral Type list, choose
Documentation and click Search. In the list<rw:graph id="graph_id" src="group_name" groups="row_key_cols"
dataValues="graph_data_cols" [series="col_key_cols"] [width="graph_width"]
[height="graph_height"] [graphHyperlink="link"]
[alternativeText="alt_text_string"][dateSortOrder="order_value"]
[tag body]
</rw:graph>
Attribute Value |
Description |
|
A unique identifier in the page scope. |
group_name |
The name of a data source group. |
row_key_cols |
A comma-separated list of data source columns that are used to generate a row-key in the XML graph definition. |
graph_data_cols |
A comma-separated list of numeric data source columns that provide data for the graph generation. |
col_key_cols |
(Optional) A comma-separated list of data source columns that are used to generate a column-key in the XML graph definition. |
graph_width |
(Optional) The width of the graph. |
graph_height |
(Optional) The height of the graph. |
link |
(Optional) The destination in an image map. A data source column can
be referenced as " |
alt_text_string |
(Optional) The value for the alt attribute in the generated
img tag at runtime. |
order_value |
(Optional) Can be either of the following:
|
When running a JSP-based Web report with the rw:graph
tag in Oracle
JDeveloper, the graph image may not display in the browser. As a workaround,
you can set the IMAGEURL
parameter in the rwservlet.properties
file in ORACLE_HOME/reports/conf
as follows:
IMAGEURL=http://host:port/Workspace-Project-context-root/servlet/oracle.reports.rwclient.RWClient
This example shows the rw:graph
tag with an XML graph definition
in the tag body.
<rw:graph id="myGraph" src="G_EMP_NAME" series="MGR_NAME" dataValues="SALARY">
<?xml version="1.0" ?>
<Graph version="1.5.0.5" pagingControlVisible="true" seriesTooltipLabelType="TLT_NONE"
groupTooltipLabelType="TLT_NONE">
<LegendArea position="LAP_RIGHT">
<Rect height="19991" width="5535" x="10141" y="9159"/>
</LegendArea>
<O1Axis lineWidth="1"/>
<O1MajorTick lineWidth="1"/>
<O1Title text="Employee" visible="true"/>
<PieFrame>
<Rect height="25224" width="19790" x="-15316" y="12109"/>
</PieFrame>
<PlotArea>
<Rect height="19589" width="15694" x="-10681" y="9426"/>
</PlotArea>
<Title text="Employees by Salary" visible="true"/>
<X1Axis lineWidth="1"/>
<Y1Axis lineWidth="1"/>
<Y1MajorTick lineWidth="1"/>
<Y1Title text="Salary" visible="true"/>
<Y2Axis lineWidth="1"/>
<Y2MajorTick lineWidth="1"/>
</Graph>
</rw:graph>
About JavaServer Pages and servlets
Adding a graph to a JSP-based Web report
Editing a graph in a JSP-based Web report
Copyright © 1984, 2005, Oracle. All rights reserved.