Solved

ReportViewer does not display image

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

624 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