1
votes

I am Having a apex application already available in Oracle APEX 4. Which is working fine.

Now i am trying to migrate to the same apex application to APEX 5.

After migrating some of the functionalities working fine in Apex 4 are not working in apex 5 like

  1. Displaying Blob images from a DB Table as Icon in interactive report in apex 5.

I am using the below query to display image in interactive report

select
apex_util.get_blob_file_src('P16_IMAGE', image_id) as icon_image from image_table

inside my application under the list view i am getting a URL generated by the apex_util.get_blob_file_src when i try to access the below link i am getting the error in the browser

http://server-info/apex/apex_util.get_blob_file?a=107&s=3797597566580&p=16&d=299222323103903080&i=299221224544903071&p_pk1=621333&p_pk2=&p_ck=P7Pek2qEnfoo5FBbvmqn4SQ-ymA&p_content_disposition=inline

Error from the Browser :

Not found

The requested URL /apex/apex_util.get_blob_file was not found on this server

please let me know whether any specific settings need to be done for the Apex 5 Interactive report to display icon image.

3

3 Answers

0
votes

Two things, Inside the region definition, Embed the function call within an image tag to display it as an image on the interactive report.

SELECT '<img src="'||APEX_UTIL.GET_BLOB_FILE_SRC('P16_IMAGE',image_id,null,'inline')
||'" height="100" width="140"/>' as IMAGE_DISPLAY FROM IMAGE_TABLE

This would enable you to control the width and size of the images as well.

Secondly, on the report attributes, make sure to have the display type as "Standard Report Column".

0
votes

It is faster to use RESTful services where you reference the img URL in the IR column HTML expression. e.g., Check this: http://krisrice.blogspot.ae/2013/07/using-restful-to-deliver-images-for-apex.html

Even if you want to stick to GET_BLOB, it is recommended to remove all HTML tags from the SQL query to the column HTML expression.

0
votes

Simplest way to show Blob Image in Interactive Report.

Set the Static ID of Blob "PIC_ID" and Copy following in Inline CSS

td[headers="PIC_ID"] img { display: block; width: 40px; border: 1px solid #999; padding: 4px; background: #f6f6f6; }