The enable externalimages property has not been set for this report?

Saqi picture Saqi · Nov 22, 2012 · Viewed 16.5k times · Source

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

enter image description here?

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();

Answer

UMAR-MOBITSOLUTIONS picture UMAR-MOBITSOLUTIONS · Jul 26, 2014

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.