Images stored in database are not displayed in apex report. Report shows string value instead of the images, how do I solve this?

huangapple go评论59阅读模式
英文:

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=&quot;javascript:showImage(this);&quot; src=&quot;'||apex_util.get_blob_file_src(&#39;P46_PHOTO&#39;,m.ID) 
|| '&quot; ALT=&quot;See full size&quot; height=&quot;50&quot; width=&quot;50&quot; />') &quot;PHOTO&quot;
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=&quot;javascript:showImage(this);&quot; src=&quot;'||apex_util.get_blob_file_src(&#39;P46_PHOTO&#39;,m.ID) 
|| '&quot; ALT=&quot;See full size&quot; height=&quot;50&quot; width=&quot;50&quot; />')
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 || &#39; &#39; || 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,&#39;&lt;img onclick=&quot;javascript:showImage(this);&quot; src=&quot;&#39;||apex_util.get_blob_file_src(&#39;P46_PHOTO&#39;,m.ID) 
|| &#39;&quot; ALT=&quot;See full size&quot; height=&quot;50&quot; width=&quot;50&quot; /&gt;&#39;) &quot;PHOTO&quot;
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 &gt;= to_date(&#39;01-01-2018 00:00:00&#39;, &#39;dd-mm-yyyy hh24:mi:ss&#39;)
and   m.id= r.id(+)
and upper(m.username) = upper(e.username)
group by m.ID, 
m.CATEGORY_ID, 
S.CATEGORY_NAME,
e.name || &#39; &#39; || 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,&#39;&lt;img onclick=&quot;javascript:showImage(this);&quot; src=&quot;&#39;||apex_util.get_blob_file_src(&#39;P46_PHOTO&#39;,m.ID) 
|| &#39;&quot; ALT=&quot;See full size&quot; height=&quot;50&quot; width=&quot;50&quot; /&gt;&#39;)
order by created_on desc

This is how the pictures are displayed in the report:

Report displaying images

instead of showing the images it displays this string values. I want it to show like this:

Report displaying images

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项目的“转义特殊字符”属性关闭

Images stored in database are not displayed in apex report. Report shows string value instead of the images, how do I solve this?

英文:

To me, it looks as if you'd have to turn the "Escape special characters" property for the PHOTO item OFF:

Images stored in database are not displayed in apex report. Report shows string value instead of the images, how do I solve this?

huangapple
  • 本文由 发表于 2023年5月26日 14:22:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/76338114.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定