Configure a Picture Box Control

You can include images in reports by using the XRPictureBox control .

To configure an image, you specify the image's file path or URL. If you know the file's name and location, you can simply enter the file path or URL. If you do not know the file's name or location in advance, you can use an expression to build the URL or file path at run time. For example, if the file name is stored as a feature attribute, you might use an expression like the following:

'https://host.mydomain.com/images/' + [imageFilename]

or

'C:\Images\' + [imageFilename]

Configure an Image

To configure an image:

  1. Open the report in Report Designer.

  2. Drag an XRPictureBox control to the desired location in the layout.

  3. Select the control and expand Actions in the Properties panel.

    Alternatively, you can select the control on the design surface instead of from the drop-down list.

  4. Image File Location: Configure one of the following settings to locate the image file:

    Settings to configure an image file's location

    Select the image file from your workstation:

    Click the icon in the Image box at to select the file in your workstation's file system.

    This option embeds a copy of the image in the report. Embedded images are limited to about 2 MB in size. To use larger images in a report, the images must be accessed by URL or from a database.

    Because the image is embedded, any changes to the source file will not be reflected in the report.

    Configure an expression to get the image from a SQL database:

    In the Image box at , type or paste an expression that defines a field in a SQL database that contains image content.

    Alternatively, click the icon to use the Expression Editor.

    Configure the image's URL:

    In the Image URL box at , type or paste the image's URL.

    Configure an expression that defines the image's URL:

    In the Image URL box at , type or paste an expression that defines the image's URL.

    Alternatively, click the icon to use the Expression Editor.

    The control on the design surface may not show exactly what the image will look like in the generated report. To see the image's final appearance, preview the report.

    The image file's location is the only required configuration. You can now preview the report if you want.

  5. Size of Image Within Control: (optional) Use either of the following methods to adjust the size of the image within the control:

    • In the Properties panel, expand Appearance | Padding and configure the Left, Right, Top, and Bottom settings in pixels.

    • In the Properties panel, expand Actions and select a method from the Sizing drop-down list to automatically adjust the image's size within the control.

  6. Other Settings: (optional) Configure any other settings that you want. See the Picture Box Control documentation for help.

  7. Click Preview to verify your configuration.

Use an Image as a Hyperlink

You can associate a hyperlink with an image by using the Navigation settings. This allows the user to click the image to point their browser at the specified destination. For example, you may want the user to be able to open your corporate website by clicking your company's logo.

To use an image as a hyperlink:

  1. Add the image to the report as described above in Configure an Image.

  2. Select the control and expand the Navigation section of the Properties panel.

    Alternatively, you can select the control on the design surface instead of from the drop-down list.

  3. In the Navigation URL box, type or paste the URL that you want the image to link to.

  4. To test the link, preview the report. Click the image in the preview to follow the link.