Solved

ReportViewer does not display image

Posted on 2008-10-10
3
1,977 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Upgrading my SSIS package in VS 2012 6 91
JSON Deserialize issue 6 42
.NET Enums [Flags] & Bitwise Design Question 6 39
How to repeat the data 4 30
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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

697 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