Click here to Skip to main content
15,889,347 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I creates a windows application and want to show image on report.rdlc file on image control. I upload the image into project folder and save path of image in to database! the Image Property is set to External
Instead of image it showing red Cross
How i can do this?

Please Help me?
Posted
Comments
Mahesh Bailwal 29-Jun-13 11:02am    
Can you share your code to give clear idea?

1 solution

Create a Parameter in the Report say "ImagePath"

For the Image control in report set following values.

Value=Parameters!ImagePath.Value
Source=External


When displaying report set the ImagePath parameter as

ReportParameter[] param = new ReportParameter[1];

C#
string strImagePath = @"file:///" + "C:\MyImages\pic.jpg";
                param[0] = new ReportParameter("ImagePath", strImagePath );
                rptViewer.LocalReport.SetParameters(param);


do other stuff as usual.

-praveen.
 
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