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评论85阅读模式
英文:

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 的报表中显示图像。但是图像没有显示出来。我不确定问题出在哪里。这是我用来显示报表的代码。

  1. select m.ID,
  2. m.CATEGORY_ID,
  3. S.CATEGORY_NAME,
  4. e.name || ' ' || e.surname,
  5. m.CONTACT_DETAILS,
  6. m.IS_ACTIVE,
  7. M.UPDATED_ON,
  8. m.UPDATED_BY,
  9. M.CREATED_ON,
  10. m.DESCRIPTION,
  11. count(r.id) Replies,
  12. 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)
  13. || '&quot; ALT=&quot;See full size&quot; height=&quot;50&quot; width=&quot;50&quot; />') &quot;PHOTO&quot;
  14. from COM_ADVERT_TB m, com_advertcategory_tb s, Com_replyadvert_tb r, system_username_tb e
  15. where m.category_id = s.category_id(+)
  16. and m.created_on >= to_date('01-01-2018 00:00:00', 'dd-mm-yyyy hh24:mi:ss')
  17. and m.id= r.id(+)
  18. and upper(m.username) = upper(e.username)
  19. group by m.ID,
  20. m.CATEGORY_ID,
  21. S.CATEGORY_NAME,
  22. e.name || ' ' || e.surname,
  23. m.CONTACT_DETAILS,
  24. m.IS_ACTIVE,
  25. M.UPDATED_ON,
  26. m.UPDATED_BY,
  27. M.CREATED_ON,
  28. m.description,
  29. 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)
  30. || '&quot; ALT=&quot;See full size&quot; height=&quot;50&quot; width=&quot;50&quot; />')
  31. 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.

  1. select m.ID,
  2. m.CATEGORY_ID,
  3. S.CATEGORY_NAME,
  4. e.name || &#39; &#39; || e.surname,
  5. m.CONTACT_DETAILS,
  6. m.IS_ACTIVE,
  7. M.UPDATED_ON,
  8. m.UPDATED_BY,
  9. M.CREATED_ON,
  10. m.DESCRIPTION,
  11. count(r.id) Replies,
  12. 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)
  13. || &#39;&quot; ALT=&quot;See full size&quot; height=&quot;50&quot; width=&quot;50&quot; /&gt;&#39;) &quot;PHOTO&quot;
  14. from COM_ADVERT_TB m, com_advertcategory_tb s, Com_replyadvert_tb r, system_username_tb e
  15. where m.category_id = s.category_id(+)
  16. and m.created_on &gt;= to_date(&#39;01-01-2018 00:00:00&#39;, &#39;dd-mm-yyyy hh24:mi:ss&#39;)
  17. and m.id= r.id(+)
  18. and upper(m.username) = upper(e.username)
  19. group by m.ID,
  20. m.CATEGORY_ID,
  21. S.CATEGORY_NAME,
  22. e.name || &#39; &#39; || e.surname,
  23. m.CONTACT_DETAILS,
  24. m.IS_ACTIVE,
  25. M.UPDATED_ON,
  26. m.UPDATED_BY,
  27. M.CREATED_ON,
  28. m.description,
  29. 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)
  30. || &#39;&quot; ALT=&quot;See full size&quot; height=&quot;50&quot; width=&quot;50&quot; /&gt;&#39;)
  31. 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:

确定