Use Images in Reports

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. Click Properties  to open the Properties panel, select the control from the Properties drop-down list, and expand Actions.

    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. Because the image is embedded, any changes to the source file on your workstation 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:

  6. Other Settings: (optional) Configure any other settings that you want. Some common settings are described in Common Properties of Controls.

  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. Click Properties  to open the Properties panel, select the control from the Properties drop-down list, and expand Navigation.

    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.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.2