Have you ever needed to dynamically change the company logo displayed on a report? This technique will work for Visual Studio 2005 and 2008. You’ll need to create a table in SQL Server to store the company name and logo, basic table would look like this:
CREATE TABLE [ReportCompanyLogo](
[CompanyName] [varchar](100) NOT NULL,
[Logo] [varbinary](max) NOT NULL
To add a company logo to this table, use syntax like:
INSERT into [ReportCompanyLogo] (CompanyName, Logo)
Select 'Acme Company' As CompanyName,
* FROM OPENROWSET(BULK 'C:\ACME_LOGO.jpg', SINGLE_BLOB) AS Logo
Using Visual Studio BIDS we define a Report dataset, note the creation of a calculated field;
Field Name: ImageBase64
Type: Calculated Field
Value (include ‘=’)
=Convert.ToBase64String(Fields!Logo.Value)
Note: a stored procedure was created to retrieve the logo based on the company name passed.

Define a report parameter named Image, specify the new dataset in the From Query section:

For the report logo, specify:
Value = Convert.FromBase64String(Parameters!Image.Value)
Once invoked, you’ll retrieve the company logo:
