Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a problem display image on RDLC using parameter (source:external). when i run on visual studio 2010, it's OK, running well. But when I publish in IIS 7, and run the report i have an error (An error occurred during local report processing). This my code:


C#
LocalReport report = new LocalReport();
report.ReportPath = ConfigurationManager.AppSettings["RDLCPath"] + "PDF_Template.rdlc";
var imagePath = @"file:\" + ConfigurationManager.AppSettings["ImagePath"];
var param = new List<ReportParameter>();
ReportParameter paramLogos1 = new ReportParameter("Path1", imagePath + approval[0].TaskOwnerID1 + ".jpg");
ReportParameter paramLogos2 = new ReportParameter("Path2", imagePath + approval[0].TaskOwnerID2 + ".jpg");
ReportParameter paramLogos3 = new ReportParameter("Path3", imagePath + approval[0].TaskOwnerID3 + ".jpg");
ReportParameter paramLogos4 = new ReportParameter("Path4", imagePath + approval[0].TaskOwnerID4 + ".jpg");
ReportParameter paramLogos5 = new ReportParameter("Path5", imagePath + approval[0].TaskOwnerID5 + ".jpg");
    
report.EnableExternalImages = true;
param.Add(paramLogos1);
param.Add(paramLogos2);
param.Add(paramLogos3);
param.Add(paramLogos4);
param.Add(paramLogos5);

report.SetParameters(param); //error when execute this code 


I'm using absolute path (imagePath + approval[0].TaskOwnerID1 + ".jpg is absolute path)
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