Example of a Horizontal Stacked Bar Chart SQL Template: Available/Allocated Capacity
From the SQL Template Designer tabbed window, select the and click at the bottom of the Query window.
Enter the heading for the drop-down list in the Static Custom Combo box--for this example,
Enter the following comma-separated list of values and then click :
These will be the options that a user can select when generating a report.
In the Query tabbed window, enter the following SQL query.
SELECT array_name, (allocated_kb)/(allocated_kb+available_kb+.001)*100 pct_allocated, (available_kb)/(allocated_kb+available_kb+.001)*100 pct_available FROM aps_v_storage_array WHERE allocated_kb >= 0 AND available_kb >= 0 AND vendor_name LIKE DECODE('${freeCombo1}','All','%','%${freeCombo1}%') ORDER BY (available_kb)/(allocated_kb+available_kb+.001)*100 DESC
The output for the horizontal stacked bar chart will look something like this: