Home > SSRS > Display images stored in Database – SSRS

Display images stored in Database – SSRS


Database Image Viewer – SQL Server Utility Software – Download now

SSRS has a feature to read image data from the SQL Server database. In this article, I will be giving step by step method to store image into database and display it in SSRS reports.

Step 1: Create a table with the following DDL

CREATE TABLE [dbo].[Pictures](
[Picture] [image] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

Step 2: Download this Image to your local drive.

Step 3: Upload image data to SQL table

INSERT INTO dbo.Pictures(Picture)
SELECT * FROM OPENROWSET(BULK N'<>\sql2012.jpg’, SINGLE_BLOB) AS i;
GO

Step 4: Create a report and create data source that connects to the image database and create dataset to fetch the image data from the Pictures table.

Step 5: Add image component and configure with image dataset

Step 6: Click OK and preview the report

You can also download a free tool to explore images stored in the table.

Database Image Viewer – SQL Server Utility Software – Download now

Thanks for reading.

Advertisements
  1. December 12, 2011 at 5:55 am

    Simple and Great post !!

  2. rajendar
    January 18, 2012 at 11:42 pm

    Hi Vishal,
    I want more clear details on this topic.

    Raaj

  1. July 11, 2013 at 4:06 am
  2. June 24, 2015 at 9:34 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: