Wednesday, 16 December 2015

Progress Bar in Reports in APEX5

APEX can create "Percentage Bars" within a report. This can be achieved using HTML Code in your Report SQL Query.

Steps:

1- Create your report:


Create an Interactive or Classic Report using SQL query :

SELECT CASE
          WHEN COLUMN <= 30
             THEN    '<div class="a-Report-percentChart" style="background-color:#000000;width:100%;"><div class="a-Report-percentChart-fill" style="width:'
                  || COLUMN
                  || '% ; background-color: 330099;"></div><span class="u-VisuallyHidden">'
                  || COLUMN
                  || '</span></div>'
                  || COLUMN
                  || '%'
          WHEN COLUMN BETWEEN 30 AND 50
             THEN    '<div class="a-Report-percentChart" style="background-color:#000000;width:100%;"><div class="a-Report-percentChart-fill" style="width:'
                  || COLUMN
                  || '% ; background-color:CC0000;"></div><span class="u-VisuallyHidden">'
                  || COLUMN
                  || '</span></div>'
                  || COLUMN
                  || '%'
          WHEN COLUMN BETWEEN 55 AND 70
             THEN    '<div class="a-Report-percentChart" style="background-color:#000000;width:100%;"><div class="a-Report-percentChart-fill" style="width:'
                  || COLUMN
                  || '% ; background-color:#99eb47;"></div><span class="u-VisuallyHidden">'
                  || COLUMN
                  || '</span></div>'
                  || COLUMN
                  || '%'
       END AS "Progress bar"
  FROM Table


Note: 
 Use CASE Statement to display different colors for the bars based on percentage.

2-Set the Report Bar column to Standard Report Column

3-Output:

In this report we're using the employees percentage of salary within their department




















Note: 
If you want same color for the bar then use the same query without CASE Statements.

8 comments:

  1. Regards
    Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
    LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.

    ReplyDelete
  2. Oracle apps and Fusion Self Paced Training Videos by Industry Experts. Please Check oracleappstechnical.com

    ReplyDelete
  3. Magnificent blog I visit this blog it's extremely wonderful. Interestingly, in this blog content composed plainly and reasonable. The substance of data is useful.
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training
    Oracle Fusion Financials Online Training
    Big Data and Hadoop Training In Hyderabad

    ReplyDelete
  4. Very interesting blog Thank you for sharing such a nice and interesting blog and really very helpful article

    Oracle Fusion HCM Online Training

    ReplyDelete
  5. Oracle Apps R12 and Oracle Fusion Cloud Self Paced Online Training Videos Published on Udemy with Life Time Access & Live Meeting Support to Clear your Queries. Avail 25% to 80% discount. Please Check https://www.oracleappstechnical.com for Never Before Offers and Discount Coupon Codes.

    ReplyDelete
  6. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.

    Oracle Fusion HCM Online Training

    ReplyDelete
  7. Good Blog, well descrided, Thanks for sharing this information.
    Oracle Fusion Financials Online Training

    ReplyDelete