The process of adding an image to a layout consists of two main steps.
- Standard images or logos - When adding runtime support for the image, one can have the image stored on a disk. In later releases of Apps10 images are always fetched from the database first. If not found, then an alternative disk location is checked. But in IFS Cloud images are always fetched from the database.
- Custom images from database - When adding runtime support for the image, one can have the image stored in a database and have it fetched (in runtime) by using an SQL query referring to a view that has the image data.
In this approach, the image to be fetched in runtime is stored on a disk/database. This could be either on the application server or on a different machine. Following are some common scenarios of working with images where the image is stored and fetched from disk in runtime. In the latest Apps10 releases and IFS Cloud, all images are fetched from the database. Yet, this is kept for backward compatibility for older Apps10 releases where priority is given first to the database and alternatively, the fallback is the disk location.
The steps below describe the process of adding a IFS logo (IFSlogbw.gif) to your report. This includes adding an image reference to the layout in design time and storing the image on disk for runtime support.
This is generally a file location in your client machine and needs to be done only once since it is a tool setting.
Press Ok to continue. The selected image file will now be listed under the schema tree as depicted below. Once the image is added a folder structure containing this image will be created under the graphics path specified in step (1). This structure comprises of the following elements. report_designer_graphics\<module_name>\<package_name>\Woco-logo-2012.png
![]()
If the property is checked the image will shrink until it completely fits inside the container box/table cell width. The aspect ratio (proportions) of the image will stay as the original. The alignment inside the box will be upper left corner. If the checkbox is unchecked, the image will align to the upper left corner, but the image will be resized according to the parent (Table Cell/Container) dimensions. Following image shows the sample preview of different instances, when the property enabled and disabled.For table cell, this option is always on.
6. A)To get the default logotype behavior simply select the Standard Images or Logos option and check the default logotype support check box. The default behavior will work as follows
- If an archive variable with the name
rhSysLogo
exists for this particular archive item that logotype will be used.- If no
rhSysLogo
archive variable exists the logotype specified in the default logotype XML element will be used. This logotype is either the complogo.gif if such file exist or the ifslogbw.gif if no complogo.gif exist.Both these files should be located in the stdlogo sub folder in the specified Report Designer graphics root folder.- Any logotype path specified in rhSysLogo archive variable will be overridden by changing the file extension from .bmp to .gif. This is necessary since IFS Report Designer doesn't work with bitmap images. Any bitmap logotype used needs to be converted to gif, jpeg, or png images to be able to be used with Report Designer.
B) To add non-IFS Company Logo
- Set the default graphics path in the report Designer tool if it’s not done already.
- Inorder to view this company logo from the tool’s preview you must have the corresponding image file in your client machine. Name this image file as complogo.gif
- Add a reference to the image file in your layout by following steps mentioned from 2 to 4.
- Select Standard images or logos option & make sure default logo support check box is checked.
- Execute the report and verify that the company logo can be previewed in runtime.
NOTE: If complogo.gif file does not exist the IFS logo will be shown as the default company logo.
7. Save and preview the layout from the tool and verify if the image is correctly shown in design time.
Sometimes you may need to add a static image that does not necessarily serve as a company logo rather servers a different purpose in the report functionality. If your requirement is such then follow the instructions below to get the images working for your report.
report_designer_graphics\<module_name>\<package_name>\image_name.gif.
- Checkbox for default logotype support (Uncheck)
- Value set for Explicit runtime image path
- Value set for Fallback runtime image path.
Set the File extension conversion value to that of your image file (gif, png or jpeg)
For runtime support the same folder structure should be checked in to the version control system.
One can also use a http/ftp path when referring to images. The http/ftp path in this case must point to the image file of your choice.
In this approach, the images to be referenced in the report must be stored in the database. When a request is made to print or preview the report the image/images are directly fetched from the database table. The relevant image is returned using an SQL statement that is specified in the layout. This approach could be used in cases where you want to fetch images from views other than the standard views used for logs and images. This query is set using the Report Designer Tool as shown below.
Please follow the below instructions to add an image to a report using the Dynamic Images stored on database function:
Follow the steps below to add design time support and runtime references.
Note: Supported image types for this function are JPEG, PNG GIF.
Note: You need to uncheck the Standard Images or Logos and Default Logo type support which might be checked by default.
However when the report is previewed from the Report Designer Tool, the images are fetched from the client machine where the tool is running and not from the database. Similar to how it works in the all of the previous scenarios listed above.
To complete the runtime setup make sure the images have been saved on to the database. Use BLOB or LONG RAW formats for storing.
Dynamic images are those in which the image changes depending on some variable in the XML or based on some condition. Dynamic images can be added to a report using both approaches described above. That is the images can either reside on a disk or be stored in a database. For example when you use a XPath to fetch images stored from a database as shown above is a typical example of using dynamic images.
Following scenarios describe how to work with dynamic images when the images are stored on disk. First a reference to the image must be given in the layout. This is done by adding some image object to the layout and specifying the means in which the image path is fetched in runtime. The next step is where the image files are copied to the application server.
The file paths to the dynamic image can be fetched using a value returned from a XPath. This is very similar to how we fetch all other data items from the XML. The difference being that in the XML a file path is stored for the corresponding XPath and not the actual data (the image in our case) embedded to the XML.
Follow the steps below to add dynamic images using a XPath reference.
Set the XPath (which will return a file path to the image) in the Explicit runtime image path.
In the above example the XPath tns:INVENTORY_PART_IMAGE should return a valid file path. For example C:\temp\part1.gif. It is also possible to pass a http/ftp path for the XPath value.
The rhSysLogo variable specified in the RDF can also be used specify different image paths depending on different report conditions. For instance one can set different image paths to the rhSysLogo variable depending on different company id's. This way you can display the different company logo's on the same report when the company id changes.
As of UPD7 images used in layouts are by default fetched from the database at runtime. These include the standard logos (IFSlogbw.gif and complogo.gif) and images that you inserted in to the layout. The IFS installer will import the logos and images to the database from the folder locations repository\server\reports\stdlogo and repository\server\reports\images from the IFS home. So it's good that you adhere to all the version controlling and have all the logos and images used in layouts in your version control repository and build home and thereby having the correct files to be import from the IFS home repository.
As of UPD8 you can use the Solution Manager \ Operational Reporting \ Report Images page in Aurena to manage your logos and images. You can add, delete or modify the images from this page.
If the logos or the images are not found in the database, then the fallback location for logos and images is taken from the value specified in the system parameter "Fallback image path for Report Designer when image is not in the database". The logos and images should be available to this location. Here the image file used as the company logo, in this case the IFSlogbw.gif or the complogo.gif should be present in the following folder structure: <fallback_graphics_path>\ stdlogo\IFSlogbw.gif or complogo.gif. For images other than logos the folder structure should be copied to the <fallback_graphics_path>\report_designer_graphics\. For example <fallback_graphics_path>\report_designer_graphics\<module_name>\<report_id>\. However this is only a fallback mechanism. If all logos and images are correctly available in the repository then this is not used and images are taken from the database.