The Read from File property specifies if the information in the column is retrieved from a database or referenced from a file. Read from File is useful if you have image, graphic, or text files that are referenced by a column. You can use Read from File with database, summary, formula, or placeholder columns (assuming that the column's values are filenames). You can also include files in your report as boilerplate.
Applies to |
Columns |
||||
Values |
|
||||
Default |
No |
||||
Required/Optional |
Optional |
REPORTS_PATH
.
You can use this variable to specify the default directory or directories
where you want Reports Builder to search for external files you use in your
reports (for example, external queries, boilerplate, and PL/SQL). This prevents the
need to hardcode directory paths in your report.
Suppose that for each of your employees you have a .bmp
file that
contains a picture of the employee. In your employee table, you have a column
named PICTURE that contains the name of the .bmp
file with the
employee's picture.
To generate a report that displays the employees' pictures, you select the PICTURE column in your query. In the Column properties for the PICTURE column, you set Read from File to Yes and specify Image as the File Format. Reports Builder will display the files pointed to by the PICTURE column wherever you have referenced the PICTURE column in your layout.
Note: If Read from File is set to No, the filenames will be printed instead of the pictures.
Suppose that you want to create an employee listing with some text from a file
next to each employee's information. If the employee's salary is greater than
$2000 you want text from a file called salary1.txt to appear next to
the employee. If the employee's salary is less than $2000 you want the text
from a file called salary2.txt
to appear next to the employee.
You create a formula column with a Datatype of Character and Read from File set to Yes (with a File Format of Text). In the Formula field for the column, you enter the following PL/SQL:
if :sal > 2000 then
return('/home/jsmith/txt/salary1.txt');
else
return('/home/jsmith/txt/salary2.txt');
end if;
Linking a text object to a file
Linking an HTML object to a file
Linking an image object to a file
Copyright © 1984, 2005, Oracle. All rights reserved.