1 / 33

Enhanced Guide to Oracle8i

Enhanced Guide to Oracle8i. Chapter 10: Using Graphics Builder. Graphics Builder. Developer utility used for creating graphical displays of database data All labels and values that appear on charts is retrieved from the database. Chart Types. Column

sanam
Download Presentation

Enhanced Guide to Oracle8i

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Enhanced Guide to Oracle8i Chapter 10: Using Graphics Builder

  2. Graphics Builder • Developer utility used for creating graphical displays of database data • All labels and values that appear on charts is retrieved from the database

  3. Chart Types • Column • Shows discrete values using vertical columns • Bar • Shows discrete values using horizontal bars • Gantt • Shows task or project scheduling information using horizontal bars

  4. More Chart Types • High-Low • Shows multiple Y-axis values for each X-axis point • Line • Shows data values as points connected by lines to show trends • Mixed • Combines a column and line chart

  5. More Chart Types • Pie • Shows how individual data values contribute to an overall total • Scatter • Plots 2 sets of potentially related data to identify possible trends • Table • Shows text data in a table

  6. More Chart Types • Double-Y • Shows a column or line chart with multiple values for the same X-axis value

  7. Creating a Chart • Use the Chart Genie to: • Specify the SQL query to retrieve the chart data from the database • Select the chart type • Define the chart display properties

  8. Specifying Chart Queries • Chart query must return all data that appears on the chart • Pie chart • pie slice labels • numerical values corresponding to each pie slice • Bar chart • X- and Y-axis labels • numerical values corresponding to each bar value • Line chart • X- and Y-axis labels • numerical values corresponding to each line value

  9. Specifying Chart Queries • When using SQL group functions (SUM, AVG, MIN, MAX) for chart data, assign a column alias Group function Column alias

  10. Defining Chart Properties • Chart Name • How chart is referenced internally • Title • Chart type • Column, bar, pie, etc. • Chart subtype • Formatting and display features for selected chart type

  11. Chart Properties Dialog Box • Chart tab Chart types Chart subtypes

  12. Data Tab • Enables you to edit the SQL query Click Edit to edit SQL query

  13. Categories Tab • Defines the labels that appear on the chart Available label fields (data fields from query) Selected label fields

  14. Values Tab • Specifies the numerical data field(s) that are displayed Available data fields (numerical data fields from query) Selected data field

  15. Formatting the Chart Display • Frame Properties dialog box • Used to format the chart frame area • Show/Hide legend • Show percentages on pie charts

  16. Applying Format Masksto Chart Data Fields • Select the field on the chart display • Select or add a format mask • Format masks can only be applied to NUMBER and DATE fields

  17. Chart File Types • Design (.ogd) files • Can be viewed and modified in Graphics Builder • Displayed in Graphics Debugger window • Executable (.ogr) files • Finished application viewed by users • Displayed in Graphics Runtime window

  18. Integrating Charts and Forms • Approaches • Create the form, then call the chart as a separate application • Display the chart directly on the form

  19. Creating a Form That Calls a Chart Value selected on form determines values displayed on chart

  20. Calling a Chart From a Form • Create parameter(s) in the chart query to accept input parameter(s) from the form • Create a parameter list in the form to pass the input parameter(s) from the form to the chart • Run the chart from the form using the RUN_PRODUCT procedure

  21. Creating a Parameter in theChart Query • Substitute one or more search conditions in the report SQL query with a parameter name prefaced with a colon (:) parameter

  22. Creating a Parameter List • Declare the parameter list variable in the DECLARE section of the trigger that calls the chart • Create the list declaring the list bind parameters creating the list

  23. Adding Parameters to the Parameter List • Parameter lists can only pass character or record group data • Add parameters to the parameter list using the ADD_PARAMETER procedure: ADD_PARAMETER(list_id, key, paramtype, value); • List_id: ID of the parameter list • Key: name of the parameter in the report • Paramtype: values can be TEXT_PARAMETER (for character values) or DATA_PARAMETER (for record groups) • Value: data value to be passed in parameter list

  24. Example of the ADD_PARAMETER Procedure List Key Paramtype Value

  25. Running the Chart Using theRUN_PRODUCT Procedure RUN_PRODUCT(product, document, communication_mode, execution_mode, location, parameter_list_id, display); • Product: application to run • REPORTS or GRAPHICS • Document: complete path and filename to chart .ogd file • Communication mode • SYNCHRONOUS: control returns to the form only after chart is closed • ASYNCHRONOUS: user can toggle between chart and form

  26. Running the Chart Using theRUN_PRODUCT Procedure RUN_PRODUCT(product, document, communication_mode, execution_mode, location, parameter_list_id, display); • Execution_mode • RUNTIME: called product's runtime environment is started • BATCH: called product is displayed directly on the form • Location • FILESYSTEM: chart file stored in the filesystem • DATABASE: chart file stored in the database • Parameter_list_id: ID of the parameter list to be passed • Display: name of the graphic image object on the form; only used when displaying a chart directly on a form canvas • Value is NULL when displaying a chart in the Graphics Runtime window

  27. Example RUN_PRODUCT Procedure Product Document Communication Mode Location Execution Mode Parameter List ID Display

  28. Form With anEmbedded Chart

  29. Creating a FormWith an Embedded Chart • Create a data block form that contains the data that will appear in the chart • Use the Chart Wizard to create the embedded chart • Edit the chart formatting as necessary in Graphics Builder

  30. Use the Chart Wizard to Specify: • Chart title, type, and subtype • Form data block that is the source of the chart data • Data fields that specify the data for the chart Category and Value data • The name of the file that stores the chart .ogd file

  31. Formatting the Chart Created by the Chart Wizard • Open the chart .ogd file in Graphics Builder • Edit the chart properties • Size • Font types • Legend display • Colors • Label format masks

  32. Creating a Report with an Embedded Chart

  33. Creating a Report With an Embedded Chart • Create a report that contains the data that will appear in the chart • Use the Chart Wizard in Report Builder to create the chart • Modify and resize the chart in Report Builder • Chart must be in same repeating frame as its source data columns • Format the chart in Graphics Builder if necessary

More Related