Home > Archive > Oracle certifications > April 2002 > Reports 6i, any help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Reports 6i, any help
Narm

2002-04-14, 10:55 am

My friend have a report -in reports 6i - that displays the employees information and the image of each employee, OK
the report gets each image from a folder on the system and not from the database, OK
the problem is:
if any employee dose not have image a "File not found" error raises, how can i make an exception so that the report displays another image let say "notfound.jpg".

Thank you all
stecal

2002-04-14, 12:59 pm

In your calling procedure -
file_found := check_file(image_number);

function check_file (image_number IN number) return boolean is

file_exists number;

begin
select count(filename) into file_exists
from file_table
where id=image_number;
<or however you want to filter/check for
file existence>

if file_exists > 0 then
return true;
else
return false;
end if;

end;

Back in the calling procedure -
If file_found is true then
<show the image>;
else
<show the error image>;
end if;
Narm

2002-04-16, 4:30 pm

The solution for the problem was as follows:

write a formula in the report where you use TEXT_IO.fopen to check if the file exists or not if the returned value false then the image isn't there so just view the "notfound.jpg".

Remmember this note you may need it some day.

And my thanks to stecal

Good Luck All
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2009 examnotes.net