Inserting an image
Images add visual appeal to reports. You can add a company logo or pictures of merchandise, or use icons instead of text labels. These images can originate from a file system, a web server, or a data source. Images are often used as decoration, but you can also use them as data. A product database, for example, might contain images of each item. If you create a report with product information, you can add product images to the report.
Figure 6‑18 shows a report that displays two types of images: a static image of a company logo, and dynamic images stored in a database.
Figure 6‑18 Report displaying two types of images
BIRT supports the following types of image files: BMP, GIF, ICO, JFIF, JPE, JPEG, JPG, PNG, TIF, and TIFF. To display an image, insert the image element in your report. You have four choices when inserting an image. You can:

Link the image from any location to the report.

Link the image from the BIRT resource folder to the report. The resource folder is a central location for external files used by reports. Rather than link images from various locations, you may find it more convenient to store all image files in the resource folder because packaging resource files for deployment is much easier.

Embed the image in the report.

Refer to the data set field that contains the images.
Use one of the first three methods to display a specific, or static, image. Typically, you display a static image once, so you insert the image directly on the report page, in a grid cell, or in the header row of a table. Use the fourth method to display a set of images returned by a data set. In this case, you probably want to display all the images in the data set field, so insert the image element in the detail row of a table.
When displaying a static image, decide whether to link or embed the image. Visually, there is no difference between a linked image and an embedded image. The difference is how changes to the image file affect what the report displays. If you link the image, any change to the original image file is reflected in the report. If you embed the image, changes to the original image file have no effect on the image that appears in the report. Use the guidelines in
Table 6‑5 to determine whether to link or embed an image in a report.
Table 6‑5 Guidelines for linking and embedding images
When to link | When to embed |
You expect to modify the original image, and you want the report to reflect future changes. | You expect to modify the original image, but you do not want the report to reflect future changes. |
You do not expect to move or delete the original image file. Moving or deleting the image file breaks the link. | The original image file might be moved or deleted without your knowledge. |