Click here to Skip to main content
15,887,336 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
C#
Good evening, I try to display an image in a reportViewer from a send path as a parameter.  But the result I get is an image in <a href="http://csharpcorner.mindcrackerinc.netdna-cdn.com/forums/uploadfile/a5b007/11152016134705PM/2016-11-15_194350.jp"> X form</a>


What I have tried:

C#
public partial class PrintFiche : Form  
   {  
       public PrintFiche()  
       {  
           InitializeComponent();  
       }  
  
       private void PrintFiche_Load(object sender, EventArgs e)  
       {  
           reportViewer1.LocalReport.ReportPath = "D:\\workspace\\Report\\FichePersonne.rdlc";  
  
           ReportParameter lim = new ReportParameter("image",@"C:\Documents and Settings\Mes images\Échantillons d'images\Collines.jpeg", true);  
           reportViewer1.LocalReport.EnableExternalImages = true;  
           reportViewer1.LocalReport.SetParameters(new ReportParameter[] {lim} );  
           this.reportViewer1.RefreshReport();  
  
       }  
   }  
Posted

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