Attractive reports are not only showing the hard material statistics and numbers. Visualization of your data leads more and more to graphical decision making. One particular part of your reports are images for logo’s, product images etc. All this data and images were stored on-premise in the past. But when moving to the cloud, where do we need to store and find our data and images? How do we connect to it how do we use it?
New dashboards are made with powerBI, where you can connect to whatever kind of data stored on whatever kind of storage provider. You can embed pictures in your dashboard or get pointed to them by some URI you specify. But what do you do with existing SSRS reports? Do you convert them all to a powerBI dashboard? There are a lot of reasons why you will stay put on them in the current SSRS reporting serving for now, waiting to transform…
Next, I’ll explain what you can do when your data and images are transformed to the cloud.
Case description:
Case purpose:
Case solution:
In the azure portal, create a SAS token
This results in a long string, something like,
‘https://myaccount.blob.core.windows.net/sascontainer/sasblob.txt?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D’
If not already done, create mater key:
CREATE MASTER KEY ENCRYPTION BY PASSWORD='****’;
Create database scoped credential: (use part from sas token beginning from ‘sv=…’)
create DATABASE SCOPED CREDENTIAL RW_hotblobcontainer
WITH IDENTITY = 'SHARED ACCESS SIGNATURE'
,SECRET='sv=********************************'
GO
Create external data source:
CREATE EXTERNAL DATA SOURCE HotBlobContainer WITH
(
TYPE = BLOB_STORAGE,
LOCATION = https://myaccount.blob.core.windows.net/sascontainer',
CREDENTIAL = RW_hotblobcontainer
)
GO
Stored procedure:
CREATE proc [SSRS].[up_GetLogoImage]
(@id int
)
as
begin
set nocount on;
/*grant
grant execute on [SSRS].[up_GetLogoImage] to [SSRS_user];
Grant ADMINISTER DATABASE BULK OPERATIONS TO [SSRS_user];
--*/
declare @SQLstmt nvarchar(max);
select top (1) @SQLstmt=N'select imagedocument.BulkColumn as BinaryData from openrowset(BULK '''+lofi.logoimagepath+''', DATA_SOURCE=''HotBlobContainer'', SINGLE_BLOB) as imagedocument;'
from dbo.vwLogoFiles lofi
where lofi.id=@id
;
declare @tblImageData TABLE(binarydata varbinary(max) );
begin TRY
insert into @tblImageData(binarydata)
exec sp_executesql @SQLstmt;
end TRY
begin CATCH
insert into @tblImageData(binarydata) values(NULL);
end CATCH
select top(1) binarydata from @tblImageData;
end
GO
The view vwLogoFiles contains:
CREATE VIEW [dbo].[vwLogoImages]
AS
SELECT baseT.[LogoImagePath]
FROM [dbo].[Establishment] as BaseT
;
GO
Result:
[LogoImagePath]='pathlevel1/pathlevel2/logo/squarelogo.png'
Resultset:
And that’s it.
The logo image is viewed on the report.
Enjoy…
Cookie | Duration | Description |
---|---|---|
ARRAffinity | session | ARRAffinity cookie is set by Azure app service, and allows the service to choose the right instance established by a user to deliver subsequent requests made by that user. |
ARRAffinitySameSite | session | This cookie is set by Windows Azure cloud, and is used for load balancing to make sure the visitor page requests are routed to the same server in any browsing session. |
cookielawinfo-checkbox-advertisement | 1 year | Set by the GDPR Cookie Consent plugin, this cookie records the user consent for the cookies in the "Advertisement" category. |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
CookieLawInfoConsent | 1 year | CookieYes sets this cookie to record the default button state of the corresponding category and the status of CCPA. It works only in coordination with the primary cookie. |
elementor | never | The website's WordPress theme uses this cookie. It allows the website owner to implement or change the website's content in real-time. |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Cookie | Duration | Description |
---|---|---|
__cf_bm | 30 minutes | Cloudflare set the cookie to support Cloudflare Bot Management. |
pll_language | 1 year | Polylang sets this cookie to remember the language the user selects when returning to the website and get the language information when unavailable in another way. |
Cookie | Duration | Description |
---|---|---|
_ga | 1 year 1 month 4 days | Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors. |
_ga_* | 1 year 1 month 4 days | Google Analytics sets this cookie to store and count page views. |
_gat_gtag_UA_* | 1 minute | Google Analytics sets this cookie to store a unique user ID. |
_gid | 1 day | Google Analytics sets this cookie to store information on how visitors use a website while also creating an analytics report of the website's performance. Some of the collected data includes the number of visitors, their source, and the pages they visit anonymously. |
ai_session | 30 minutes | This is a unique anonymous session identifier cookie set by Microsoft Application Insights software to gather statistical usage and telemetry data for apps built on the Azure cloud platform. |
CONSENT | 2 years | YouTube sets this cookie via embedded YouTube videos and registers anonymous statistical data. |
vuid | 1 year 1 month 4 days | Vimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website. |
Cookie | Duration | Description |
---|---|---|
ai_user | 1 year | Microsoft Azure sets this cookie as a unique user identifier cookie, enabling counting of the number of users accessing the application over time. |
VISITOR_INFO1_LIVE | 5 months 27 days | YouTube sets this cookie to measure bandwidth, determining whether the user gets the new or old player interface. |
YSC | session | Youtube sets this cookie to track the views of embedded videos on Youtube pages. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the user's video preferences using embedded YouTube videos. |
yt-remote-device-id | never | YouTube sets this cookie to store the user's video preferences using embedded YouTube videos. |
yt.innertube::nextId | never | YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen. |
yt.innertube::requests | never | YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen. |
Cookie | Duration | Description |
---|---|---|
WFESessionId | session | No description available. |