Using the Sample Database Application, I want to show a picture of the item bought on that day (Reports/Orders Calendar). (I know this might not be a real-life situation, but I'm trying to see how to show a picture that is attached to a date - like a person's birthday). On Page 10 (Order Calendar), I copied the region, Order Calendar, to Order Calendar 2.
I changed the Region Definition to:
select o.order_id
,o.order_timestamp
,(select
decode(nvl(dbms\_lob.getlength(p.product\_image),0),0,null,
'\<img alt="'||apex\_escape.html\_attribute(p.product\_name)||'" title="'||apex\_escape.html\_attribute(p.product\_name)
||'" style="border: 4px solid #CCC; -moz-border-radius: 4px; -webkit-border-radius: 4px;" '
||'src="'||apex\_util.get\_blob\_file\_src('P10\_PRODUCT\_IMAGE',p.product\_id)||'" height="75" width="75" />')
from demo_order_items i,demo_product_info p
where o.order_id=i.order_id
and i.product_id=p.product_id
and rownum=1
) as first_item
from demo_orders o ,demo_customers c
where o.customer_id=c.customer_id
I added item P10_PRODUCT_IMAGE, Display As, File Browse, to Region Order Calendar 2. I changed it to Display Image, but that didn't make a difference.
There's no place in Region Attributes to change the "Display Text As" to "Standard Report Column", which is done in "Interactive Report" Report Attributes.
In Region Attributes: Display Column: FIRST_ITEM, Start Date Column: ORDER_TIMESTAMP
