HTML

Can't leave well enough alone...

Here is some code to update the previous widget to show data in a green/yellow/red bar graph like an audio meter:

The code is here:

CREATE OR REPLACE FUNCTION GetGraph (p_value IN NUMBER, p_total IN NUMBER DEFAULT 100)
RETURN VARCHAR2
IS

-- David Mann
-- 05/26/2009
-- Create HTML bar graph widget for use in Application Express reports.
-- Has thresholds for yellow and red.
-- Parameters: p_value - Top of ratio fraction or percentage as whole number (0-100)

Quickie bar graph widget for use in Apex Reports...

I'm trying not to scare my users off with endless rows and columns of numbers. I have an app that analyzes memory usage and swap space usage of some of our servers. Instead of throwing all kinds of computer sciency '65535' and '32767' numbers at my user I decided to create a small function to return a bar graph widget.

Here is an example of the graph in use:

Here is a function that will return the HTML for the widget:

CREATE OR REPLACE FUNCTION GetGraph (p_value IN NUMBER, p_total IN NUMBER)

SQL Developer Custom Report Example - Long Operations Graph

I added a new tutorial to my collection of SQL Developer information. The tutorial covers creation of a HTML Custom Report for SQL Developer.

Here is an example of the report running and showing 1 long operation (click to enlarge):

If you would like to see how this is done the tutorial is available here.

--Dave

Subscribe to HTML