Click here to Skip to main content
15,914,447 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am having some problem to load picture which is a Logo to the crystal report with its Location Path:

I am following these steps:

1. create a string parameter in the report and name it 'PicPath'
2. insert an OLE Object (insert menu - OLE Object)
3. You will get a new window. in that, select the option for 'Create from file' - browse for any picture file () - click on OK step1.JPG
4.Click on Ok. Place this OLE Object in Report / Page Header according to your design
5.Right click on the OLE Object -> select 'Format Graphics'
6.Select 'Picture Tab' (see fig 2) step2.JPG
7.on the Graphic Location click on 'Formula Editor' button.
you will get a new formula editing window.
8.you can see the parameter 'Pic Path' under the 'Report Fields' drag it step3.JPG
check for any errors in the formula.

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 everytime 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. Please guide me what I am doing wrong here. I really need this urgently.

mentioned that I am using Asp.net and C sharp to view the report. And crystal report XI.

Thank you.
Posted

1 solution

Check this my past answers on this.
Showing image in crystal report[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900