I am busy with app migration from apex 4.2 to apex 5.1. I have already created the pages and exported the data in the database (DBeaver). I want to display images in a report in apex 5.1. But the images are not displayed. I am not sure what the problem is. this is my code to display the report.
select m.ID,
m.CATEGORY_ID,
S.CATEGORY_NAME,
e.name || ' ' || e.surname,
m.CONTACT_DETAILS,
m.IS_ACTIVE,
M.UPDATED_ON,
m.UPDATED_BY,
M.CREATED_ON,
m.DESCRIPTION,
count(r.id) Replies,
decode(nvl(dbms_lob.getlength(PHOTO),0),0,null,'<img onclick="javascript:showImage(this);" src="'||apex_util.get_blob_file_src('P46_PHOTO',m.ID)
|| '" ALT="See full size" height="50" width="50" />') "PHOTO"
from COM_ADVERT_TB m, com_advertcategory_tb s, Com_replyadvert_tb r, system_username_tb e
where m.category_id = s.category_id(+)
and m.created_on >= to_date('01-01-2018 00:00:00', 'dd-mm-yyyy hh24:mi:ss')
and m.id= r.id(+)
and upper(m.username) = upper(e.username)
group by m.ID,
m.CATEGORY_ID,
S.CATEGORY_NAME,
e.name || ' ' || e.surname,
m.CONTACT_DETAILS,
m.IS_ACTIVE,
M.UPDATED_ON,
m.UPDATED_BY,
M.CREATED_ON,
m.description,
decode(nvl(dbms_lob.getlength(PHOTO),0),0,null,'<img onclick="javascript:showImage(this);" src="'||apex_util.get_blob_file_src('P46_PHOTO',m.ID)
|| '" ALT="See full size" height="50" width="50" />')
order by created_on desc
This is how the pictures are displayed in the report:
instead of showing the images it displays this string values. I want it to show like this:
Kindly assist, I think something is wrong with the code on how I am displaying the images. How do I solve this?
>Solution :
To me, it looks as if you’d have to turn the "Escape special characters" property for the PHOTO item OFF:
