Well it has been a long time since I got to work with SQL Reporting services but for the most part I really like it.

One problem we had was that we have about 20 reports all with the companies logo on it. We could imbed it in each report but that would result in a lot of duplicated logos.

So the solution we came up with was to use a relative path to a logo contained in the report assembly… easier said than done. Long story short we finally got it to work with the following code:

="file://" & System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "..\..\Images\Logo.png")

A funny thing is that reports run in a sandboxed domain for security reasons. In that sandboxed domain you have a very limited subset of functions you can call. In order for the above code to work we needed to change the domain that the report runs in the current appdomain:

reportViewer.LocalReport.ExecuteReportInCurrentAppDomain(AppDomain.CurrentDomain.Evidence)

Also the report viewer will not load external images by default so you will need to do the following:

reportViewer.LocalReport.EnableExternalImages = True

And finally we were able to load external images with out having to hardcode in the paths!