Skip to main content

get MS CRM Organization Logo in SQL query and showing on SSRS


In this article I am showing you to how to update and retrieve the Organization logo and display in SSRS report logo using SQL query. First of all we need to add Organization logo in MS CRM .I am using MS CRM 2016 On premises  version.



Go to Setting then Customization for add new theme.

Go to theme in Customization Tab.

now you can see the above screen shot.MS CRM have default theme is already available but we cannot edit the default theme So we have clone the existing theme and update the logo.


The above screenshot is showing the area of Logo.

Above screenshot is selecting the logo from web resource . I have added logo in web resource

Above screenshot is assign the logo in theme.


Now We need to publish the  theme that will make default theme.
the above screenshot will show the update theme with update logo.
the above query will retrieve the Organization Logo from MS CRM database.

Now I am showing the above logo in SSRS report.so I have created new Dataset and paste the query

Add new Image control and update the properties.

Above screenshot is showing the properties of Image control in ssrs report.

The above screenshot is update the expression in SSRS

The above screenshot is showing the screenshot in  SSRS report.


Query :

select WB.Content from ThemeBase TB
inner join WebResource WB on TB.LogoId = WB.WebResourceId
where TB.IsDefaultTheme=1

Comments