Solved

ReportViewer does not display image

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now