0% found this document useful (0 votes)
1 views

How to Show BLOB Object in HTML Report only picture

This document provides a step-by-step guide on how to display BLOB objects, specifically images, in an HTML report using Oracle APEX. It includes instructions for creating a sample table, a data entry form, and the necessary PL/SQL code to generate the HTML report with images. Additionally, it offers links to related tutorials and resources for further learning.

Uploaded by

patfay208
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

How to Show BLOB Object in HTML Report only picture

This document provides a step-by-step guide on how to display BLOB objects, specifically images, in an HTML report using Oracle APEX. It includes instructions for creating a sample table, a data entry form, and the necessary PL/SQL code to generate the HTML report with images. Additionally, it offers links to related tutorials and resources for further learning.

Uploaded by

patfay208
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

How to Show BLOB Object in HTML Report only picture

*****************************************************

1. Create Sample Table and put some data on this table and also create a form for
data entry. This form file browse item
neet to reference later on html report

CREATE TABLE "SAMPLEIMG"


( "ID" NUMBER,
"NAME" VARCHAR2(50),
"JOB_ID" VARCHAR2(50),
"PIC" BLOB,
"MIME_TYPE" VARCHAR2(50),
"FILE_NAME" VARCHAR2(50),
"CHARSET" VARCHAR2(50),
"BLOB_UPDT" DATE,

2. Create Form on this table

3. Create a page for your html report and paste the below code on your page region

DECLARE
cursor mycur IS
SELECT ROWID RID,ROWNUM RNM, ID, NAME, PIC
FROM SAMPLEIMG;

BEGIN

htp.p('<!DOCTYPE html>
<html>
<head>
<style>
#customers {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}

#customers td, #customers th {


border: 1px solid #ddd;
padding: 8px;
}

#customers tr:nth-child(even){background-color: #f2f2f2;}

#customers tr:hover {background-color: #ddd;}

#customers th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
</style>
</head>
<body>
<table id="customers">
<tr>
<th>SL NO</th>
<th>EMP ID</th>
<th>NAME</th>
<th>PICTURE</th>
</tr>');
for i in mycur loop
htp.p('
<tr>
<td>'||i.RNM||'</td>
<td>'||i.ID||'</td>
<td>'||i.NAME||'</td>
<td style="width: 25%;">'||'<img src="'||
apex_util.get_blob_file_src('P5_PIC',i.RID)||'" style="height: 250px;width:
100%;border-radius: 24px;" />'||'</td>
</tr>');
END LOOP;
htp.p('
</table>
</body>
</html>
');
END;

4. Save and Run the application.

***If you Like This Tutorial please subscribe my channel. Your subscription
inspired my to make next tutorial.

Another Tutorial on this channel

1. How to Install Oracle Apex 20.1 on 19c DB with ORDS 19.4 and Tomcat 9
https://www.youtube.com/watch?v=G-q0Z...
2. Report or page loading time
https://www.youtube.com/watch?v=f5j0e...
3. How to Open Pluggable Database
https://www.youtube.com/watch?v=0Thdv...
4. How to Delete PDB Using DBCA on 19c,12c,18c
https://www.youtube.com/watch?v=Bj_Df...
5. How to Create 19c PDB Using DBCA
https://www.youtube.com/watch?v=NcowY...
6. How to Change End User Theme In Oracle Application Express(APEX)
https://www.youtube.com/watch?v=gEkqr...
7. How to Oracle Apex Region Refresh Without Page Submit
https://www.youtube.com/watch?v=ITa7P...
8. How to Refresh Your Page By setting your time.....
https://www.youtube.com/watch?v=I93xp...
9. Show PL/SQL Process Error Using Dynamic Action
https://www.youtube.com/watch?v=QHkgzpnQguQ
10. Allow Number With Decimal Point
https://www.youtube.com/watch?v=Ft-jLYzCdOE
That's it Thank you all
If you like the Tutorial please subscribe the channel
|********************************|
| Docs Created By |
| Md. Arif Hossain(OCP) |
| Dhaka, Bangladesh |
| eMail: apxschool@gmail.com |
|********************************|
|********************************|

Sample Application Link:


https://apex.oracle.com/pls/apex/apxschool/r/example14/show-blob-on-html-report?
session=109093608347750 (goto show blob on html report)

YouTube Turorial Link: https://youtu.be/-ZiCjNYK2tg


YouTube Channel Link: www.youtube.com/c/eknowledgearif

You might also like