An image report item is used to display images in a report. You can display an image in an image report item directly from a database, using direct links or an embedded image. We can use an image manager to embed required images into a report from a local disk. Images can be of the BMP, JPG, PNG, or X-PNG type. In this blog, first we will see how to add an image from the local disk into an ssrs report using the image manager and then how to display an embedded image, an image from a database, and one from an external link using an image report item.
An image manager allows you to embed local images into a report. When you embed an image, MIME encodes the image and stores it as text in the report definition. The embedded image will always be available to that report and listed in the image manager panel.
Add an image to report from local disk
Follow these steps to add an image to an SSRS report using the image manager panel.
- Click the image manager panel icon in the configuration panel.
- Click ADD IMAGE.
- Browse for and select an image in the local disk and then click Open.
- The chosen image will be listed in the image manager panel and the image data will be saved as part of the report definition.
Note: Only one image can be imported in the image manager at a time, so repeat the previous steps to add more images in the image manager panel.
Delete an embedded image from a report
To delete an embedded image from a report, open the image manager panel and hover the mouse over the image you want to delete. Now, click the Delete icon.
It will launch the following confirmation dialog.
Click Yes to remove the image from the report.
Display images using image report item
You can use the image report item as a container to display an image in a report. It is listed in the item panel in the Basic Items category.
Drag the image report item into the design surface.
Now the image report item will be added to the design surface and the item properties will be listed the properties panel.
Display an embedded image in image report item
Select an image report item and open the properties panel. Under the Basic Settings category, select the Source type Embedded.
The images added under the image manager panel will be listed in the Value drop-down. Choose the name of the image that you want to display in the report.
You can also display an image in the design surface directly from the image manager itself. Hover the mouse over the required image and click the add symbol.
Now, the chosen image will be displayed in the design surface using the image report item.
Display image in image report item from external link
External images can be added in the report from the web or other websites. Select an image report item in the design surface and select the Source type External. Then, specify the URL in the Value property or set an expression that evaluates the URL.
Now, the image is displayed in the image report item container in the design surface.
Display an image in image report item from database
You can display an image in an image report item that is stored in a database. To display an image from a database in your report, select Database as the Source. Now the data set fields available in the report will be listed in the Value drop-down. Choose the data set field that holds image data in the database.
While displaying an image from a database, additionally we must specify the MIME type. Supported MIME types are listed in the MIME property drop-down list. Choose the MIME type according to your image type. The MIME type is a property used to decide the format of the image to be added in the report.
When you set database as the image source, the processed image will be displayed in the image report item only during report preview.
In this blog post, we have learned how to add an image report item and display images from different sources in your report in the Bold Reports designer. We hope this blog provided a clear idea of how to add images to an SSRS report and display them using the image report item. To explore further, go through our sample reports and Bold Reports documentation.
If you have any questions, please post them in the comments section. You can also contact us by submitting them through our contact page, or if you already have an account, you can log in to submit them. Bold Reports now comes with a 15-day free trial with no credit card information required. We welcome you to start a free trial and experience Bold Reports for yourself. Give it a try and let us know what you think!