Adding images to reports

One way to improve the attractiveness of a report is to use an image. An image displaying a company logo or a contextual picture can convert a simple report into one with a professional feel.

Reports can include pictures, or graphic images, in addition to the attribute information from your geographic data. You might add a graphic image of your company's logo in the Report Header to indicate the source of the report or include images from a raster field in the Details section to provide a visual representation of the geographic features you are reporting on.

While you are designing the layout of your report, use a Picture control if you want to add an image to your report. Picture controls include an Image Source property that allows you to choose the source of your image from three options. The three image source options are 1) Choose a field, 2) Use a file path to a local, network, or web location, and 3) Use a static image.

Choosing a field as the Image Source

You can choose any Raster or Text field as the source of an image in your report. If you choose a Text field, the field values need to be the path to the image file. This means that you can also choose to add a Calculated field as long as you have set the field type to be string. The advantage of using a Calculated field is that you can use multiple fields to build the source file path of your images. If you are generating a report on Geodatabase data with Attachments enabled, you can add a RelatedReport control to access the attachment table and use attached images from the Blob field as the source for your picture element.

TipTip:
When using attachments, a definition query that filters the attachments by file types will be applied by default. The query is this: "Content_Type LIKE 'image/%'. If this query is removed, all attachment files will be used when generating the report, but only images will be displayed.

Using a file path as the Image Source

You can assign the source of a picture element to be a file path to an image. The file path can be to an image stored locally on disk, over the network via a UNC path, or to an image on the web using a URL. If, over time, the image is updated at the location that your picture is pointing to, your report will automatically use the updated image.

Using a static image as the Image Source

You can assign the source of a picture element to be a specific image. This is useful if the image you are displaying is unlikely to change over time, such as a flag or corporate logo. When you embed an image, you can also share the report layout file (.rlf) without having to share the image.

Steps:
  1. Open a report in the Report Designer.
  2. Under Design Elements, click Picture.
  3. Click and drag the Picture element into the appropriate section. For example, you might place a corporate logo in the Report Header section, since you only want to use it once. If you want to use the images loaded into a raster field of the source layer or table, you will probably want to place the image in the Details section, so each row has a corresponding image.
  4. Under Element Properties, change the Image Source property.
  5. Click the ellipses (…) button to display the Image Source dialog box and select the option you want to use.
TipTip:
Images aren't always sized exactly as you'd like them to be. Under Element Properties, use the Size Mode property of an image to adjust how the image is displayed. Clip mode will set the image to the initial extent of the image element. Stretch mode will stretch the image to fit in the extent of the element, and Zoom mode will maintain the maximum aspect ratio of the image inside the element.

Related Topics

3/5/2014