Declares the type, size, and source of an image to print.
DECLARE-IMAGE image_name [TYPE=image_type_lit] [IMAGE-SIZE=(width_num_lit,height_num_lit)] [SOURCE=file_name_lit] [[FOR-PRINTER=({POSTSCRIPT|HPLASERJET|HTML|PDF|WINDOWS |PS|HP|HT|PD|WP},image_type_lit,file_name_lit) . . .] END-DECLARE
DECLARE-IMAGE and PRINT-IMAGE work together to identify information about the image. The IMAGE-SIZE argument is required and must be defined in either DECLARE-IMAGE or PRINT‑IMAGE. The SOURCE and TYPE arguments are optional; however, if you define one you must define the other.
Unique name for referencing the image declaration.
Image type. Types can be EPS-FILE, HPGL-FILE, GIF-FILE, JPEG-FILE, BMP-FILE, PNG-FILE, or AUTO-DETECT.
Width and height of the image in Production Reporting coordinates.
Name of a file containing the image. The file must be in the SQRDIR directory, or you must specify the full path.
Separate image file for each report output type.
The TYPE and SOURCE arguments contain the default values. You can override these defaults for a specific printer by using the FOR-PRINTER argument.
If the file is not in the SQRDIR directory, the full path or no path should be given. A relative path will not do, because you need to know where you execute the file from.
DECLARE-IMAGE defines and names an image. This image can then be placed in a report at the position specified with PRINT‑IMAGE.
If an image has not been declared, or if the image type is not supported for a particular report output type, or if the image file has incomplete header information, then a box (either shaded for HP printers or with a diagonal line through it for Postscript printers) appears where the image is expected. Table 28 illustrates the valid relationships between image type and report output type.
declare-image officer-signature type= eps-file source= 'off_sherman.eps' image-size= (40, 5) end-declare
declare-image oracle-logo type='auto-detect' image-size=(40,10) source=$BLOB_Column
The following example defines separate image files for different printer types:
begin-setup declare-image oracle_logo type=GIF-FILE Image-size=(40,10) source=oracle.gif for-printer=(PS, EPS-FILE, 'oracle.eps') for-printer=(HP, HPGL-FILE, 'oracle.hpgl') end-declare end-setup
begin-report move 'hyperion.bmp' to $image_src print-image oracle_logo (10,15) for-printer=(WP, BMP-FILE, $image_src) end-report
In this example, the image file used for each printer type is:
HP—‘oracle.hpgl’ (Identified using FOR-PRINTER in DECLARE-IMAGE)
PS—‘oracle.eps’ (Identified using FOR-PRINTER in DECLARE-IMAGE)
PD—‘oracle.gif’ (Declared as default using SOURCE= in DECLARE-IMAGE)
HT—‘oracle.gif ’ (Declared as default using SOURCE= in DECLARE-IMAGE)
WP—‘oracle.bmp’ (Identified using FOR-PRINTER in PRINT-IMAGE)