As salamualikum (islamic greetings), brothers and sisters. :)
Today, i discuss an important issue, many of oracle developer spend hours and hours to make a reports to show image from file system, which is much complex.
From Now on, it will be easy and remain easy. :)
Follow the bellow steps.
- Take a Formula column
- Data Type Char
- Length 500
- Set READ FROM FILE property to YES
- Set File Format to Image
- Make the Image stored folder as Shared Folder
function CF_IMAGEFormula return Char is
filename VARCHAR2(200);
tiff_image_dir VARCHAR2(80) :='<PC_NAME>/emp_picture/'; --// Folder name should be shared for shared link.
out_file Text_IO.File_Type;
BEGIN
out_file :=Text_IO.Fopen(tiff_image_dir||:EMP_CODE||'.jpg', 'r'); -- r is read only AND EMP_CODE is the name of image.
filename := tiff_image_dir||:EMP_CODE||'.jpg';
return filename;
exception
when no_data_found then
RETURN tiff_image_dir||'blank.jpg';
when others then
if sqlcode=-302000 then
RETURN tiff_image_dir||'blank.jpg';
end if;
end;
You are Done :)
Pray for me to Almighty Allah (swt) to keep it up and for my hereafter.
bhi tell me how to open image in form 6i
ReplyDeleteI got the REP-606 error
ReplyDeletealhamdulillah i have done this thank you
ReplyDeleteTried this it's working in Reports 10g. Thank you
ReplyDeleteit's working for bmp image but not for the jpg format.
ReplyDelete