views:

368

answers:

2

In an SSRS report:

I am specifying the footer's background image using an expression, so that the image on the first page is different from other pages.

The images are stored as part of the project, and are displaying correctly, however I get this warning

Build complete -- 0 errors, 0 warnings

[rsInvalidImageReference] The Value for the page ‘footer’ is invalid. 

Details: Invalid URI: The format of the URI could not be determined.

Preview complete -- 0 errors, 1 warnings

Anyone know what causes this warning, and how I should get rid of it?

Edit: Is it possible to do this, and to avoid using an absolute path? I need to use relative paths within the project as I cant control where this is getting rolled out to.


The expression I'm using to select the image for the Footer/BackgroundImage/Value property is:

= IIf(Globals!PageNumber.Equals(1), "image1.png", "image2.png")

Also, I've tried setting the BackgroundImage Source and MIMEType as well to external and image/png, it doesn't seem to make a difference.

A: 

Make it an absolute URL and not a relative one. For example instead of image2.png return http://myhost.com/image2.png or file://C:/test/myimage.png

scott
That would fix it, but I don't have control over how/where the report will be used, and have to keep all of the URIs relative.
Sophia
+1  A: 

I use embedded images and use expressions in places to determine how they show up and have never had an issue.

  • Are you adding the images to the report by Report > Embedded Images > New Image ?
  • Then when you add the image control to the report, select Embedded Image ?
Dustin Brooks
This worked perfectly, thankyou :)
Sophia