i am using 9.2 and Forms 6i/Reports 6i.
i want to store images in DB and retrieve in Forms and Reports to display and print, how i can do it???
if any other method instead store in DB like store location/path of image and retrieve in Forms and Reports???
please give an example this will help alot.
thanks for the help.
i have done it.
for those who don't know how to store pictures / images store in database and retrieve in Form / Report.
created a table:
m_pic long raw
created a form, added a block thru Data Block Wizard and selected all fields for Data Block and also for Canvas. when done this, opened Canvas and see that Developer created an Image Box for m_pic field, added a button to insert a picture in Image Box as:
users_image_dir VARCHAR2(80) := 'c:\users\photos\';
:System.Message_Level := '25';
photo_filename := users_image_dir||LOWER(:test01.m_name)||'.jpg';
READ_IMAGE_FILE(photo_filename, 'JPG', 'test01.m_pic');
IF NOT FORM_SUCCESS THEN
MESSAGE('The user '||trim(:test01.m_name)||' does not have a photo on file');
:SYSTEM.MESSAGE_LEVEL := '0';
as you can see the value of photo_filename variable as LOWER(:test01.m_name) this means (in this example) user have to enter a valid JPG filename (without extension .jpg and complete path) as it saved on HDD path (in this case c:\users\photos is the value of user_images_dir), when user will press button the picture / image file with the given name in m_name field will be display in m_pic field (Image Box) and user can save it on database.
in Reports simply use SQL statement to retrieve all three columns but when you completed your layout / design go to the m_pic field's property and select file type as Image and thats all.
this is only functionality, to resize image or to change place etc. play around and you will get better ideas.