Skip Headers

Oracle9i Reports Tutorial
Release 9.0

Part Number A90900-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

7
Reviewing the Source Code for the Graph

Estimated completion time: 5 minutes

In Chapter 6, "Creating a Graph for the Web Report", you added a graph to a JSP-based Web report. This chapter reviews the source code added for the graph.

7.1 View the source in Reports Builder

Open the Web Source view for the report you created in Chapter 6, "Creating a Graph for the Web Report" called emprevb_<your initials>.jsp.

7.2 Review the rw:graph Tag

The rw:graph tag brackets the graph information and links the graph to the data source. It also identifies the categories and the data fields.

  1. In the Web Source view, locate the <rw:graph> JSP tag.

    The code within the rw:graph tag is XML.

  2. Locate the lines beginning with "O1", for example:

    <O1Axis lineWidth="1"/>
    <O1MajorTick lineWidth="1"/>
    ...
    

    These lines define the attributes associated with the X-axis.

  3. Locate the <SeriesItems> tag, for example:

    <SeriesItems>
    <Series id="0" color="#ff3300"/>
    <Series id="1" markerShape="MS_SQUARE"/>
    <Series id="2" markerShape="MS_SQUARE"/>
    ...
    </SeriesItems>
    

    This tag defines the attributes for the values along the X-axis.

  4. Here, you can see that the color value FF3300 is applied to the first bar along the x-axis:

Figure 7-1 Graph with Color on X-axis

Text description of graph_rvw.gif follows.

Text description of the illustration graph_rvw.gif

  • Locate the <Title> tag, located here:

    </SeriesItems>
    <Title text="Employee by Salary"...>
    
    

    This tag adds the graph title to your Web report, shown here:

    Figure 7-2 Graph with Title

    Text description of graph_rvw_title.gif follows.

    Text description of the illustration graph_rvw_title.gif

  • Locate the </rw:graph> JSP tag, located here:

    </Graph>
    
    -->
    </rwgraph>
        <p>&nbsp;</p
    ...
    

    The XML that produces the graph is closed before the <rw:graph> JSP tag is closed.


    Note:

    The Graph Wizard is re-entrant. So, if you'd like to modify your graph, you can always move your cursor into the XML between the rw:graph tags, then choose Edit > Selection. The Graph Wizard displays with the options you chose in Chapter 6 selected


    7.3 Summary

    Congratulations! You have finished reviewing the source code for your new graph and completed the Oracle9i Reports Tutorial. For more information on creating Web reports, adding report blocks and data, and creating graphs, see the Reports Builder online help.


  • Go to previous page Go to next page
    Oracle
    Copyright © 2002 Oracle Corporation.

    All Rights Reserved.
    Go To Documentation Library
    Home
    Go To Product List
    Solution Area
    Go To Table Of Contents
    Contents
    Go To Index
    Index