英文:
Images stored in database are not displayed in apex report. Report shows string value instead of the images, how do I solve this?
问题
我正在忙于将应用程序从 apex 4.2 迁移到 apex 5.1。我已经创建了页面并在数据库 (DBeaver) 中导出了数据。我想在 apex 5.1 的报表中显示图像。但是图像没有显示出来。我不确定问题出在哪里。这是我用来显示报表的代码。
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
这是报表中显示图像的方式。
英文:
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?
答案1
得分: 1
要我看,似乎您需要将PHOTO
项目的“转义特殊字符”属性关闭:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论