Home » Developer & Programmer » Reports & Discoverer » Displaying Images from File System (reports 11g)
Displaying Images from File System [message #622272] Sun, 24 August 2014 01:40 Go to next message
manyal
Messages: 84
Registered: March 2005
Member
Freinds,

I want to display images of vistors, stored in application server file system, in oracle reports.


following is the format.

visitorno visitor name visitor image

101 ABC ABC Photo (stored as named 101_photo in file system)
102 XYZ XYZ Photo (stored as named 102_photo in file system)
................................................................................
................................................................................

Kindly suggest the siplest approach.

Manyal



Re: Displaying Images from File System [message #622314 is a reply to message #622272] Mon, 25 August 2014 02:16 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
An example based on Scott's schema: I created a simple report whose query looks like this:
select empno, ename, empno || '_photo.jpg' e_photo
from emp
where empno = 7369

I let wizard create the layout. Then I manually modified E_PHOTO field's properties by setting
- Read from file -> Yes
- File format -> Image

I put 7369_photo.jpg into a directory which can be read by the report (part of the REPORTS_PATH).

The result:

/forum/fa/12119/0/

  • Attachment: rep_photo.png
    (Size: 41.12KB, Downloaded 2048 times)
Re: Displaying Images from File System [message #622349 is a reply to message #622314] Mon, 25 August 2014 09:36 Go to previous messageGo to next message
manyal
Messages: 84
Registered: March 2005
Member
but how the path would be known to oracle report, where images are actually stored

suppose images are stored in folder /home/oracle..../images.where i have to set this path.

Manyal
Re: Displaying Images from File System [message #622367 is a reply to message #622349] Mon, 25 August 2014 13:34 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm on Windows, so I set it in registry.
Re: Displaying Images from File System [message #622452 is a reply to message #622367] Tue, 26 August 2014 10:15 Go to previous messageGo to next message
manyal
Messages: 84
Registered: March 2005
Member
thanx littlefoot, its working, in query itself i have given full path like below

select empno, ename, '/home/oracle/images/'||empno|| '_photo.jpg' e_photo
from emp
where empno = 7369

Razz
Re: Displaying Images from File System [message #622456 is a reply to message #622452] Tue, 26 August 2014 11:10 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That's OK, but - keep in mind, if you ever change images' location, you'll have to modify all reports where the path is hardcoded.
Previous Topic: Can I use parameters in views to be called in Discoverer
Next Topic: Continue printing frame on next page.
Goto Forum:
  


Current Time: Thu Mar 28 16:42:15 CDT 2024