AMH
AMH

Reputation: 6451

dynamic image in rdlc not appear correctly

I have this hirarcy in my project

Report forlder -> Image Folder , Reports -> Rdlc

in rdlc I set the image source to external and use parameter

when add the parameter to report call the report not appear

I write the parameter like

"file:images\icon.jpg" is there an certain extension to use or why this cause the report to not appear ,I tried to remove the image and the report work fine

Upvotes: 0

Views: 780

Answers (1)

Raphael
Raphael

Reputation: 1687

you should pass the complete image path to your image in this way if you pass it like you've done I don't thik it will work.

ReportViewer1.LocalReport.EnableExternalImages = true;
ReportViewer1.LocalReport.SetParameters(new ReportParameter("image", "file:///" + Server.MapPath("~/images/icon.jpg",true));

Upvotes: 1

Related Questions