Adding Images or Logos to EcoSys Report Headers
EcoSys reports can be customized by adding images. These images can display any image file (of type .jpg, .png or .gif), including a customer’s business and/or company logo. These images can be configured in a report or report template. If in a template, the template can then be applied to multiple reports in EcoSys.
Setting Up Report Images
To use images in headers/footers, the image file must be uploaded to the application server. The image extension file can be in the format of jpg, png, or gif. To host images on the same server as EcoSys, create a “reportimages” directory inside the ESFM_HOME directory. (Note: This folder must be added to each node in a clustered environment and the image files must exist in each folder of each node.)
If an HTML preview of reports is desired, “http://” is required. In this case, the FMServerSettings.properties file must point the URL to the report images folder.
Set the FMServerSettings.properties as follows:
- images.baseurl=http://localhost:
/ecosys/reportimages/ - Examples:
- images.baseurl=http://localhost:8080/ecosys/reportimages/
- images.baseurl=http://www.mywebserver.com/ourcompany/ourfiles/
- images.baseurl=file://C:/esfm/DEV/properties/reportimages/
reports.images.baseurl=file:///home/user/Pictures/
For PDF generation in command line batch mode, both “http://” and “file://” are supported. The trailing “/” must be included.
This is broken down in the example image below.
As a test, you should be able to type the URL and the file name of the image into a browser and access the file. If the file cannot be accessed with that test, an EcoSys administrator needs to make the file location available on the application server (see the Setup section above). For more information, please refer to this Hexagon/EcoSys Knowledgebase article.
Adding Images to Reports
To add the image to a report, in the report’s configuration editor, the Header/Footer tab sets various report format options or specifies a report format template to use to set formatting options. This tab also allows inclusion of specific global variables and images to display in headers and footers.
To customize the header or footer to include an image:
- Select the Customize radio button for the desired Report Header/Footer or Page Header/Footer.
- Click the pencil icon.
- Use the variable drop down to add the image variable, ‘[Image:<filename>]’
- Add the image filename to the variable. For example, if my file name is “EcoSysLogo.png” then the variable would read “[Image:EcoSysLogo.png]”.
- The URL and file names are case sensitive.
The above configured template has been added to the below report. The preview of this report now displays a product logo in the top left Report Header and a company logo.