
1- Create your report
In this report we're using the employees percentage of salary within their department
SELECT e.ename,
e.job,
d.dname,
e.sal,
ROUND (e.sal / SUM (e.sal) OVER (PARTITION BY e.deptno) * 100, 0) pct_dep_sal,
ROUND (e.sal / SUM (e.sal) OVER (PARTITION BY e.deptno) * 100, 0) bar
FROM emp e,
dept d
WHERE e.deptno = d.deptno
2- Add Percentage Bar for the "bar" column
- In the Reports Attributes section, click on the "Bar" column attributes
- Under Number/Date formatting enter the following: PCT_GRAPH:330099:CC0000:100
PCT_GRAPH:<Hex background color>:<Hex foreground color>:<Bar width in pixels>

4 comments:
Cool! I like it.
Where did you find information about this feature?
Hi Louis,
I can't remember exactly where I found it but a long time ago I either asked about it on the forum or Scott Spendolini told me about it.
I completely forgot about it until last week so I thought that I'd write about it since I couldn't find anything on the forums.
Maybe it was here: http://www.inside-oracle-apex.com/more-undocumented-new-features-in-oracle-apex-31/#high_2
;)
But it definitely deserves repeating.
Joel
Hi Joel,
I don't like to copy other peoples post, so thanks for pointing that out. I didn't realize their was a pl/sql procedure for it as well.
Thanks,
Martin
Post a Comment