Home » Developer & Programmer » Forms » read image in oracle reports
read image in oracle reports [message #613749] Sat, 10 May 2014 04:37 Go to next message
haider_1pk
Messages: 109
Registered: March 2009
Location: PAKISTAN
Senior Member
Hello Friends,

Kindly guide me how to i can use read_image_file in oracle reports.

I have made it in oracle forms name of student_bio.

st_id, st_name, path from student;
and use trigger of pre_insert read_image_file in forms level.
So picture is display.

Kindly guide how i have to make it in oracle reports.

Thanks
Re: read image in oracle reports [message #613758 is a reply to message #613749] Sun, 11 May 2014 02:04 Go to previous messageGo to next message
ranamirfan
Messages: 534
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
Please have a look http://www.orafaq.com/forum/mv/msg/187679/584892/#msg_584892.

Regards,
Irfan
Re: read image in oracle reports [message #613768 is a reply to message #613758] Mon, 12 May 2014 01:07 Go to previous messageGo to next message
haider_1pk
Messages: 109
Registered: March 2009
Location: PAKISTAN
Senior Member
Hello friends waiting your reply
Re: read image in oracle reports [message #613789 is a reply to message #613768] Mon, 12 May 2014 05:36 Go to previous messageGo to next message
mist598
Messages: 1188
Registered: February 2013
Location: Hyderabad
Senior Member
Can you please try this..

DECLARE 
    filename VARCHAR2(200); 
BEGIN 
    filename := 'C:\NEW\IMAGE_FILE\' ||:block_name.item_code ||'.jpeg'; 

    Read_image_file(filename, 'JPEG', 'OPTIONS_IMAGE'); 

    IF NOT form_success THEN 
      Read_image_file('C:\NEW\IMAGE_FILE\blank.jpg', 'JPEG', 'OPTIONS_IMAGE'); 
    END IF; 

END; 


Otherwise check this link
http://hamid-oracle.blogspot.in/2012/02/how-to-read-image-file-at-oracle-forms.html

[Updated on: Mon, 12 May 2014 05:38]

Report message to a moderator

Re: read image in oracle reports [message #613791 is a reply to message #613749] Mon, 12 May 2014 06:31 Go to previous messageGo to next message
haider_1pk
Messages: 109
Registered: March 2009
Location: PAKISTAN
Senior Member
Thanks bro for reply .

But I need help about report . How i can do this in oracle`s reports.


Re: read image in oracle reports [message #613801 is a reply to message #613791] Mon, 12 May 2014 07:23 Go to previous messageGo to next message
mist598
Messages: 1188
Registered: February 2013
Location: Hyderabad
Senior Member
why you wants to use read_image_file in oracle reports, for what purpose can you please explain what is your exact requirement?
Re: read image in oracle reports [message #613803 is a reply to message #613801] Mon, 12 May 2014 07:40 Go to previous messageGo to next message
ranamirfan
Messages: 534
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
Please Follow the following Steps.
1-
Select St_id, St_name  from student;

2-
Save the Images in one folder with Same Name as St_Id
3-
Put one Formula Column in Report & go to his Property
a- Datatype - Character
b- Read from File - Yes
c- File Format - Image
function CF_1Formula return Char is
begin
  Return ('C:\'||:St_id||'.jpg');
end;

Hope It'll help you.

Regards,
Irfan
Re: read image in oracle reports [message #613851 is a reply to message #613803] Tue, 13 May 2014 00:57 Go to previous messageGo to next message
haider_1pk
Messages: 109
Registered: March 2009
Location: PAKISTAN
Senior Member
Thanks bro is solved .
Re: read image in oracle reports [message #613852 is a reply to message #613851] Tue, 13 May 2014 01:12 Go to previous messageGo to next message
ranamirfan
Messages: 534
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Thanks for the feedback.
Re: read image in oracle reports [message #614140 is a reply to message #613803] Sat, 17 May 2014 06:44 Go to previous messageGo to next message
mehboob110233
Messages: 55
Registered: February 2014
Location: Pakistan
Member

please also give me idea how can i use exception
when no pic on the same directory.
Re: read image in oracle reports [message #676070 is a reply to message #614140] Thu, 09 May 2019 11:07 Go to previous messageGo to next message
oracertified
Messages: 1
Registered: May 2019
Junior Member
Believe it or not, I am having the same trouble. I have to test to see if the file is there before attempting to read it... UTL_FILE requires that the database is able to read the directory.
Re: read image in oracle reports [message #676071 is a reply to message #676070] Thu, 09 May 2019 11:13 Go to previous messageGo to next message
BlackSwan
Messages: 26669
Registered: January 2009
Location: SoCal
Senior Member
oracertified wrote on Thu, 09 May 2019 09:07
Believe it or not, I am having the same trouble. I have to test to see if the file is there before attempting to read it... UTL_FILE requires that the database is able to read the directory.

Welcome to this forum

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read

DIRECTORY must reside on DB Sever (file system) & have necessary OS file permissions.
DIRECTORY is Oracle object name that maps to OS fully qualified pathname

Re: read image in oracle reports [message #679012 is a reply to message #676070] Tue, 28 January 2020 08:18 Go to previous messageGo to next message
myclassic
Messages: 136
Registered: December 2006
Location: Pakistan
Senior Member
function CF_1Formula return Char is
LOC VARCHAR2(40):='C:\';
PIC VARCHAR2(500);
out_file Text_IO.File_Type;
BEGIN
  out_file :=Text_IO.Fopen(LOC||:EmployeeId||'.JPG', 'r'); -- r is read only
  PIC:=LOC||:EmployeeId||'.JPG';
  RETURN PIC;
    exception
      when others then 
     RETURN 'C:\3'||'.JPG';
     
end;
Solution for Exception, Simply place a file 3.jpg that you want to show in case of exception. e.g. No_Image.Jpg
Re: read image in oracle reports [message #679024 is a reply to message #679012] Tue, 28 January 2020 10:44 Go to previous message
Michel Cadot
Messages: 66929
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
exception
      when others then 
Read WHEN OTHERS.

Previous Topic: Using custom.pll
Next Topic: Oracle Forms 12c new features
Goto Forum:
  


Current Time: Sun Mar 29 23:51:35 CDT 2020