Code: Select all
SELECT '*'||a.Employee_code||'*' AS "BARCODE", a.Employee_code,
a.employee_code||'.bmp' as pict,a.job_status,
a.Employee_name, a.Designation_desc,a.new_nic_no,
a.COMPANY_CODE, b.company_name,b.ADDRESS,
a.location_code, c.location_name,
a.department_code, d.department_name,
e.division_code, division_name
FROM Employees a,
company b,
locations c,
departments d,
divisions e
where a.company_code = b.company_code
and a.location_code = c.location_code
and a.department_code = d.department_code
and a.employee_code between :eno and :sno
and e.division_name = :div
and a.division_code = e.division_code
and a.department_head = 'N'
Code: Select all
function CF_1Formula return Char is
l_filename text_io.file_type;
BEGIN
l_filename := text_io.fopen ('.\D:\Pictures\' || :pict, 'r');
text_io.fclose (l_filename);
RETURN :pict;
EXCEPTION
-- the report photo doesn't exist
WHEN OTHERS THEN
BEGIN
l_filename := text_io.fopen ('.\D:\Pictures\default_image.jpg', 'r');
text_io.fclose (l_filename);
RETURN 'default_image.jpg';
EXCEPTION
-- the report photo 'default_image.jpg' doesn't exist
WHEN OTHERS THEN RETURN NULL;
END;
END;