I am having some problem to load picture which is a Logo to the crystal report with its location path:
I am following these below steps:
I got these steps from here: http://social.msdn.microsoft.com/Forums/en-US/f869fe3f-ee0f-4ecd-ae7c-9303e0b1f66f/dynamic-image-location-by-using-a-parameter
In the back end I am using this code:
CrystalDecisions.CrystalReports.Engine.ReportClass clsReport = new CrystalDecisions.CrystalReports.Engine.ReportClass();
clsReport.SetParameterValue(2, "D:\\mypc\\NEW_Images\\client-logo.bmp");
but every time I am trying to run the project it is giving me error when I click to view the report. And the report is coming with written word "Image" instead of the image.
I am using Asp.net and C sharp to view the report. And Crystal Report XI.
I have solved my problem by adding this handler to my web.config file:
<add
name="ChartImageHandler"
preCondition="integratedMode"
verb="GET,HEAD" path="ChartImg.axd"
type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
I got the solution from this page.