Reports Using Image Trim
Image trim is a static part of the report definition used to enhance the look of the report and is not user bitmap data retrieved through image fields from the user's data tables. 4GL procedures cannot contain initialized image trim objects, so the image trim used by a report procedure must be stored elsewhere.
During report definition these images are stored in the database or on disk. This makes porting dynamic procedures difficult since the location of the required images is encoded within the report. If the images were originally stored in the database, the Reporter catalogs would need to exist and the images would need to be stored with the same unique keys and names. The only way this could be accomplished safely is to load the Reporter catalogs from the original design database.
For images stored on disk the same path to the image files would have to exist on the target machine. This requires bitmap image files to be deployed in addition to the report.
These mechanisms are still available but, in addition, more portable mechanisms are provided for handling both types of image storage.
Database-resident Images
Database-resident images may be copied into an Image Server Frame, which is imported into the target application or an included application of the target application.
Before a report is run, an Image Server variable must be initialized with the Image Server Frame containing Image Trim required by the report. A global Image Server Variable (G_ImgSvr) of type u_imgsvr is provided in repopen.img (which must be included in any application that runs report procedures). You may declare additional image server variables, but a report procedure always expects to find its images in G_ImgSvr. An Image Server Frame may contain images for any number of reports and mimics the original database-resident mechanism for image storage.
When running a static Reporter-generated procedure from an application, an Image Server is used by default for any image trim originally stored in the design database.
Note:
• When an Image Server is used it is assumed that all database-resident images are available from the Image Server.
• A report run from the Reporter File/Print menu item will not use the Image Server since, in this mode, the report and its images must already exist in the database.
The Procedure Tool provides the means to construct and update an Image Server Frame.
Disk-resident Images
Disk-resident images may be installed in a single directory, which you may define at runtime, or through the environment.
You may specify the directory containing report image trim bitmaps in the environment variable II_REPIMAGE_DIR or the report parameter PM_ImgDir. For more information, see
Image Directories and
Optional Parameters.
Note:
• If an image directory is specified by either method, all disk-resident images are assumed to be located in the named directory.
• If PM_ImgDir is set, it overrides any setting of II_REPIMAGE_DIR.
• If neither PM_ ImgDir nor II_REPIMAGE_DIR is set, the original paths are used for disk-based images.
• To force use of original paths even when an environment variable is set, use:
PM_DIR = '<embed>'
• Reporter File/Print always uses the original paths.
Last modified date: 06/25/2024