kajojeq
kajojeq

Reputation: 904

SSRS external image display in designer but not in application

I try to display image on report. In code everything is fine, checked on two other PC's: works there. On my pc When I set img path like file:D:/koala.jpg I can see it in designer but when I run application it does not appear on report (red cross appear).

However when I set path for not local file, any address http://..../koala.jpg it works fine in designer and application. Image from database is also displayed fine. It looks like the only problem is with local file on running application. Path is fine, image is fine.

errors:

Warning: The value of the MIMEType property for the image ‘Image1’ is “application/octet-stream”, which is not a valid MIMEType. (rsInvalidMIMEType) Warning: The value of the ImageData property for the image ‘Image1’ is “”, which is not a valid ImageData. (rsInvalidExternalImageProperty)

important: I tested application on few PC's and: same program works fine on every one, displayed image in desginer AND running application from same path `d:/koala.jpg' same picture(on their local disks), and only on my PC it display it on designer and NOT in running application.

Could that be a problem with Server because in Reporting Services Configuration Manager I see on Use built in account: Report$myServer and on other PC i saw only Report? Sorry for messy question I try to figure out where problem is too long

Edit 1:

I found out something. When I use custom code in report properties which were using path to file to read it to byte array I got problem with permission and IO exception. However when I do the same, Read file to byte array and then put it to image as Database not external image it works fine. So somehow it works but I would like to know why it is not when report viewer try to open file.

summarize:

I have permission problem whenever ReportViewer try to by himself open file on my PC. (by external image or custom code). Reward go to person whos answer let me put as external image path to my LOCAL FILE and it will work when I open application.

Upvotes: 3

Views: 2746

Answers (2)

B.Patel
B.Patel

Reputation: 31

Soory for the formatting as I am new to this forum.

Can you replace your logic?

file:D:/koala.jpg

with

"file:///"+"D:/koala.jpg"

Please provide the correct path for images...

Let me know if it works.

Thanks

Upvotes: 0

StevenWhite
StevenWhite

Reputation: 6024

The SSRS Report Server doesn't have access to your local files. Here are your options:

  • Embed the image in the report (.rdl is larger and the image isn't shared)
  • Save the image on the Report Server (will work when published, but not locally)
  • Save the image in a publicly accessible site

If you are using SharePoint Integrated mode, you can save the image to a folder there. For Native mode, you can save it in a folder in the Report Manager.

Upvotes: 2

Related Questions