ActiveReports 14
ActiveReports 14 User Guide / How To / Page Report/RDL Report How To / Report Controls / Work with Images
In This Topic
    Work with Images
    In This Topic

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

    To embed an image in your report

    The benefit of using an embedded image is that there is no separate image file to locate or keep track of when you move the report between projects. The drawback of using embedded images is that when you use large images, it increases the size of 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 is stored in the report definition.
    3. With the Image report control selected, in the Properties grid, set the Source property to Embedded.
    4. In the Value property, select the embedded image from the drop-down list box.

    To add a data visualizer image to your report

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

    1. With the Image report control selected, 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 other values in the dialog.

    To store an image in your Visual Studio project.

    You may have an image that you want to use in multiple reports, for example a logo. In such cases, you can store your image 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.

    1. From the Project menu, select Add Existing Item and navigate to the image file that you want to add to the project.
    2. With the Image report control selected, in the Properties grid, set the Source property to External.
    3. In the Value property, select project image from the drop-down list box.

    To use a database image in an Image report control

    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.

    Note:
    • You cannot use database images in Page Headers and Page Footers because these sections cannot use the value expressions that refer to fields.
    • Microsoft Access database images are generally stored as OLE objects which the Image report control cannot read.
    1. With the Image report control selected, in the Properties grid, set the Source property to Database.
    2. In the Value property, select the field containing the image.

    To use a Web image

    You can also use any image to which you can navigate via a URL. The advantage of using web images 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.

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