Quantcast
Channel: Welcome To TechBrothersIT
Viewing all articles
Browse latest Browse all 1876

SSRS Tutorial 59 - How to Create Report that Get Image from Database Table in SSRS

$
0
0
In this video " How to create Report that gets Images from Database Table" we are going to learn below items
  1. How to Create Sample Table and Store Images to it in SQL Server
  2. How to create New Empty Report and Create Data Set Including Image Field from Table
  3. How to use Image Item in SSRS Report and Map to Image Field from Table
  4. Learn Image Item Properties to fit Image properly in SSRS Report



Sample script for the SSRS Report
--drop table [dbo].[TotalSale]
CREATETABLE [dbo].[TotalSale] (
[id] [int] NOTNULL
,[SalePersonFName] [varchar](100) NULL
,[SalePersonLName] [varchar](100) NULL
,[ProductName] [varchar](100) NULL
,[ItemsSold] [int] NULL
,[SoldPrice] [float] NULL
,[SoldDate] [date] NULL
,[City] [varchar](100) NULL
,[State] [varchar](100) NULL
,[Country] [varchar](100) NULL
,[Region] [varchar](100) NULL
,SalePersonImage VARBINARY (MAX) NOTNULL
)

INSERT [dbo].[TotalSale] (
[id]
,[SalePersonFName]
,[SalePersonLName]
,[ProductName]
,[ItemsSold]
,[SoldPrice]
,[SoldDate]
,[City]
,[State]
,[Country]
,[Region]
,SalePersonImage
)
Select
1
,N'Aamir'
,N'Shahzad'
,N'TV'
,1
,700
,CAST(N'2015-07-15'ASDATE)
,N'Charlotte'
,N'NC'
,N'USA'
,N'North America'
,BulkColumn
FROMOPENROWSET (BULK'C:\Users\ashahzad\Desktop\InputFolder\Aamir.png', SINGLE_BLOB) 
AS SalePersonImage

UnionAll
Select
2
,N'M'
,N'Raza'
,N'Cell Phone'
,2
,800
,CAST(N'2015-07-15'ASDATE)
,N'Charlotte'
,N'NC'
,N'USA'
,N'North America'
,BulkColumn
FROMOPENROWSET (BULK'C:\Users\ashahzad\Desktop\InputFolder\Aamir.png', SINGLE_BLOB) 
AS SalePersonImage




How to Get Image from Database Table and Display in SSRS Report - SSRS Tutorial
 
 

Viewing all articles
Browse latest Browse all 1876

Trending Articles