ActiveReports 13
Image
ActiveReports 13 > ActiveReports User Guide > Concepts > Page Report/RDL Report Concepts > Toolbox > Image

The Image report control displays an image that you embed in the report, add to the project, store in a database, or access through a URL. You can choose the Image Source in the Properties Window after you place the Image report control on the report.

Embedded Images

The benefit of using an embedded image is that there is no separate image file to locate or to keep track of when you move the report between projects. The drawback is that the larger the file size of the image you embed, the more inflated your report file size becomes.

To embed an image in your report

  1. In the Report menu, select Embedded Images.
  2. Click under the Image column to reveal an ellipsis button (...) and select an image file from your local files. The Name and MimeType columns are filled in automatically and the image file's data is stored in the report definition.
  3. Click to select the Image report control, and in the Properties grid, set the Source property to Embedded.
  4. Drop down the Value property and select the image from the list of embedded images.

Data Visualizer Images

You can use a data visualizer to display data in small graphs that are easy to comprehend.

To add a data visualizer image to your report

  1. Click to select the Image report control, and in the Properties grid, drop down the Value property and select <Data Visualizer...>.
  2. In the Data Visualizers dialog that appears, select the Visualizer Type that you want to use, Icon Set, Range Bar, or Data Bar.

  3. Use expressions related to your data to set the rest of the values in the dialog. 

Project Images

You may have an image that you want to use in multiple reports, for example a logo. In such cases, you can store it as a project image. This not only allows you to quickly locate the correct image for new reports in the project, but also makes it easier when you update your logo, as you will not need to search through every report to replace embedded images. Another benefit is that the images are distributed with your application.

To store an image in your Visual Studio project

  1. Right-click the project in the Solution Explorer and select Add, then Add Existing Item and navigate to the image.
  2. Click to select the Image report control, and in the Properties grid, set the Source property to External.
  3. Drop down the Value property and select the image from the list of project images.

Database Images

Product catalogues are probably the most common scenario in which images stored in a database are used in reports. Place the Image report control in a data region to use database images that repeat for every row of data. 

Keep in mind that you cannot use database images in Page Headers and Page Footers because these sections cannot have value expressions that refer to fields. 

To use a database image in an Image report control

  1. Click to select the Image report control, and in the Properties grid, set the Source property to Database.
  2. Drop down the Value property and select the field containing the image.
Note: Microsoft Access database images are generally stored as OLE objects which the Image report control cannot read.

Web Images

You can also use any image to which you can navigate via a URL. The benefit of this is that images stored in this way add nothing to the file size of the project or of the report, but the drawback is that if the web based image is moved, it will no longer show up in your report.

To use a Web image

  1. Click to select the Image report control, and in the Properties grid, set the Source property to External.
  2. In the Value property, enter the URL for the image.

Image Dialog

Properties for the Image are available in the Image dialog. To open it, with the Image control selected on the report, under the Properties Window, click the Property dialog link.

The Image dialog lets you set properties on the report control with the following pages.

Note: You can select <Expression...> within many of these properties to open the Expression Editor.

General

Name: Enter a name for the image that is unique within the report. This name can be called in code. You can only use underscore (_) as a special character in the Name field. Other special characters such as period (.), space ( ), forward slash (/), back slash (\), exclamation (!), and hyphen (-) are not supported.

Tooltip: Enter a string or expression that you want to appear when a user hovers the cursor over the image in the viewer at run time.

Image Value: Enter the name of the image to display. Depending on the Image Source chosen below, you can give a path to the image, select an image to embed, or pull images from a database. This property also allows you to choose the <Data Visualizer...> option to launch a dialog that will let you build a data visualization expression.

Image Source: Select whether the image comes from a source that is External, Embedded, or Database.

MIME Type: Select the MIME type of the image chosen.

Visibility

Initial visibility

Visibility can be toggled by another report control: Select this check box to display a toggle image next to another report control. This enables the drop-down box below where you can specify the TextBox control that toggles the visibility of the image. The user can click the toggle item to show or hide this image.

Navigation

Action

Select one of the following actions to perform when a user clicks on this image.

None: The default behavior is to do nothing when a user clicks the image at run time.

Jump to report: For drill-through reporting, select this option and provide the name of a local report, the relative path of a report in another folder, or the full path of a report on another server.

Parameters: Supply parameters to the targeted report by entering the Name of each parameter, the Value to send to the targeted report, or whether to Omit the parameter. Note that parameter names you supply must exactly match parameters in the target report.

Tip: You can remove or change the order of parameters using the X and arrow buttons.

Jump to bookmark: Select this option and provide a valid Bookmark ID to allow the user to jump to the report control with that Bookmark ID.

Jump to URL: Select this option and provide a valid URL to create a hyperlink to a Web page.

Document map label: Enter an expression to use as a label to represent this item in the table of contents (document map).

Bookmark ID: Enter an expression to use as a locator for this image. You will then be able to provide a bookmark link to this item from another report control using a Jump to bookmark action.

See Also