Solved

ReportViewer does not display image

Posted on 2008-10-10
3
1,974 Views
Last Modified: 2013-11-26
I have a report that contains an image control.  If I hard-code the reference to a .jpg file the report previews from my windows application correctly.  The image is displayed (so I know it's not a permissions issue).  When I use a relative reference, from a query, in the value field of the image control, the image does not display.  It display the red x.

However, when I preview the report in MS Visual Studio, the report works with the relative reference.  Somehow VS is rendering the report in the correct way and my application is not.

My application has a form with a Microsoft.Reporting.WinForms.ReportViewer control on it.  So far it
has rendered all the reports correctly, except for the relative reference image.  I've set the EnableExternalImages to true, but that didn't help.  Plus, my reports are not local.

Does anyone have suggestions for how to get my report viewer form to render the report correctly?

Also, when I copy the exact same image control inside the body, both image controls display the correct image.
0
Comment
Question by:AK777
3 Comments
 
LVL 12

Accepted Solution

by:
jgv earned 500 total points
ID: 22694877
Is the report local or remote (you should be setting this in the ProcessingMode property from your code)? If you are processing the report locally then the relative path would be within the context of the machine running your application. If you are processing remotely then the path would be within the context of the server that is running the report manager. If it's the latter then it's either a permission problem (SSRS is likely executing under a local system account) or the path is invalid from that machine. The reason the image displays properly when you are running from the designer in VS is because it is being complied on your machine by VS (so the path is within the context of your dev. computer). Once the report has been deployed to the server, your application with the reportviewer control is requesting that the server compile the report which results in the path being resolved from the server. To correct this you would first have to determine if the path is valid from the server and set the appropriate permissions to access the images or use a different path if it's not valid from the server.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question