Sql – How to share an image between projects in Microsoft SQL Server Reporting Services 2005

reporting-servicessql-server-2005

I have a SQL Server 2005 Reporting Services solution containing several reporting projects. (I need separate reporting projects so that I can deploy reports to the correct folders on the report server.)

We want to include our company's logo in the header of each report.

I don't want to bake the logo image into each report ("embedded"); nor do I want to include a copy of the logo in each reporting project.

Still, I would like for the logo to "live" in the solution and on the report server one way or another so it's packaged up with the reports and gets deployed along with the reports.

How?

Best Answer

The best solution I have come up with so far goes like this:

  • Create a reporting project (called “Shared” in my case).
  • Include the logo image in that project (it goes into the “Reports” folder, but that seems irrelevant).
  • Configure that project to deploy where and when I want. (For the “where”, a folder called “Shared” was the default and suited me.)
  • On each report, set the properties for the image in the “layout” tab thus (and I mean the properties in the sidebar view, not the other properties in the pop-up dialog box):
    • Under “Data”, set Source to “External”
    • Under “Data”, set Value to “../Shared/logo.png”

(To apply this to many reports, it helps to do bulk manipulations on the RDLs’ underlying XML.)

This shows a broken image link when I play with the report in Visual Studio, but when I deploy it to a report server, the logo appears.