0
votes

I have been stuck in a Crystal Reports to display images from URL. I'm using Crystal Reports to produce my reports, and the goal is to load some pictures that their physical paths are stored in a SQL server database.

When I use the preview mode of the Crystal Reports, the images are been displayed successfully in a report, however, when I try to deploy the report from an asp.net application, the report images are not displayed.

2
Did you view the source and see what URL the asp.net page is trying to use to render the image? Did you try loading that URL into the browser? My guess is the application is hosted on another machine and so the images (which might only be on your local Windows file system?) aren't directly accessible.Aaron Bertrand
@AaronBertrand, the url was been loaded in browser without problems. The application is hosted in a machine and the images are in another one, which is not my local machine. The url of asp.net page does not identify the physical path of the images, the path is stored on database and the crystal reports received and handle that.VIP Leiloes

2 Answers

0
votes

you can do this by adding the Crystal Reports Image Handler in Web.Config This is the most important part and without it you will not see the Images in Crystal Report. You need to add the following in the section of Web.Config.

More info

http://www.aspsnippets.com/Articles/Display-image-from-database-in-Crystal-Report-in-ASPNet-using-C-and-VBNet.aspx

0
votes
<httpHandlers>
  <add verb="GET" path="CrystalImageHandler*" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>

<handlers>
      <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler*" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
    </handlers>

I struggled but the soultion was this simply