Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CASE statement (or similar functionality) in interactive report?

mblakeneMar 16 2010 — edited Mar 16 2010
Hello,

I've written a report based on an anonymous block of PL/SQL that allows me to show a different colored icon on the report based on the value of one of the columns - show green if value is less than x, show yellow if value is between x and y, and show red if value is greater than y.

Here is the code block:

for i in (select proj_id, proj_name,
CASE
WHEN proj_cost < 10 THEN '<img src="#APP_IMAGES#green-circle.jpg">'
WHEN proj_cost > 10 and proj_cost <15 THEN '<img src="#APP_IMAGES#yellow-circle.jpg">'
WHEN proj_cost > 15 THEN '<img src="#APP_IMAGES#red-circle.jpg">'
ELSE NULL
END proj_cost
from project)

loop
htp.p('<p>' || i.proj_id || ', ' || i.proj_name || i.proj_cost ||'</p>');
end loop;

Can I do something similar with an interactive report? I want the flexibility of the interactive report but the ability to still include this customer requirement in the report.

Thanks!

-melissa
This post has been answered by jariola on Mar 16 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2010
Added on Mar 16 2010
2 comments
725 views