Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ReportViewer does not display image

Posted on 2008-10-10
3
Medium Priority
?
1,986 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Accepted Solution

by:
jgv earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
How to increase the row limit in Jasper Server.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

721 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