I am trying to add an external photo as the logo along with the report on the report.rdlc
file. I have this error
The enable externalimages property has not been set for this report
?
Here is my code.
try
{
this.pedidosTableAdapter.Connection.ConnectionString = con.MysqlConnect();
this.pedidosTableAdapter.Fill(this.fabricacaoDataSet8.pedidos, Pages.relatorios.num);
this.reportViewer1.RefreshReport();
}
catch { }
// for external image
this.reportViewer1.LocalReport.EnableExternalImages = true;
ReportParameter parm = new ReportParameter();
parm=(new ReportParameter("path", @"C:\logo.jpg",true));
this.reportViewer1.LocalReport.SetParameters(parm);
this.reportViewer1.Refresh();
I have experience when you enable external images using Code, it works on local / development environment but while deployment on server it does not works and reports raise error:
"The enable external images property has not been set for this report"
In order to solve this issue, use EnableExternalImages="true"
property in ASPX or design file where you are using ReportViewer Control and it will work perfectly.