Image

Displays an image within the report.

Description

Reports often display images in various formats: corporate logos, product images, icons, and so on. Popular image formats are JPEG for photographs, and GIF, PNG and SVG for computer-generated graphics such as logos.

The image item provides an image in one of a number of formats. The image can come from a number of sources. The image item can be sized to the image (in which case the height and width attributes are ignored), or the image can be sized or clipped to fit the item. Images are always scaled proportionately.

The image item is similar to the Image report element in RDL, the image control in AFC and the picture item in Crystal. Key features include:

The image element should provide a number of options for handling images that are larger or smaller than the size of the element itself:

The following table shows which properties are used for each image source type.

Property Embedded File URL Computed
Image Name X
URI X X
Value Expression X
Type Expression X
Size X X X X

XML Summary

Inherited Properties

dataSet
Allows the user to fetch the image from a data set. The image is in the first row of the data set.
toc
While the image can appear in the TOC, it is generally not very useful to do so.

See Also

action

An optional hyperlink for this image.

Description

Provides a hyperlink from this image.

See Also

helpText

An optional help text for the image.

Description

An optional help text for the image. The help text can contain HTML formatting and can be externalized. The web viewer shows this as "balloon help."

See Also

helpTextID property

altText

An optional text message to display in place of the image in a web browser.

Description

An optional text message to display in place of the image in a web browser.

See Also

altTextID property

altTextID

Resource key for the altText property.

Description

Resource key that allows externalizing and localizing the value of the altText property.

See Also

altText property

source

The kind of image reference.

Choices

Description

The image can be provided in a number of formats. The choice here determines which of the other properties that BIRT will consider when obtaining the image value.

The expr option is not available in Release 1.0. That is, the image cannot be retrieved from a database in Release 1.0.

See Also

uri

The identifier for the image if the type is File or URL.

Description

The identifier for the image if the type is File or URL. The type of image is inferred from the image file content or HTTP response.

See Also

imageName

The name of an embedded image if the Source type is Embedded.

Description

The name of an embedded image if the Source type is Embedded.

See Also

valueExpr

An expression which returns the image contents.

Description

An expression which returns the image contents.

See Also

typeExpr

An expression that returns the type of the image expressed as a MIME type.

Description

An expression that returns the type of the image expressed as a MIME type: image/jpeg, image/png, image/gif, etc. If omitted, BIRT will attempt to infer the image type from the data in the image itself.

See Also

size

How to manage the relationship between image and item size.

Description

See Also

onCreate

Script executed when the element is created in the Factory.

Description

Executed when the element is created in the Factory. Called after the item is created, but before the item is saved to the report document file. See the scripting spec for additional information about this script. Applications should perform visual customization in the on-render script instead.

onPrepare

It is for a script startup phase. No data binding yet. The design of an element can be changed here.

Description

It is for a script startup phase. No data binding yet. The design of an element can be changed here.

onRender

Script executed when the element is prepared for rendering in the Presentation engine.

Description

Executed when the element is prepared for rendering in the Presentation engine. Changes made to the element are written to the target output format, but not saved to the report document file. This is the preferred place for visual customizations.