I\'ve created an rdlc report. I have a reportViewer on my form. When I try to load the report I get : \"The report definition for report \'xxxx.rdlc\' has not been specifie
There are some reasons causing this problem and sometimes the problem might occur only when publishing the same application to IIS
. If the report file (*.rdlc) is existed in the related location and the problem still continues, you can try the following methods in order to fix it:
from LocalReport.ReportEmbeddedResource Property on MSDN
“… An embedded report resource is a report definition that has been stored as a resource in the calling assembly. If the ReportPath property has been set, the ReportEmbeddedResource property is ignored. It also causes the report loaded with LoadReportDefinition to be ignored.”
Change:
reportViewer.LocalReport.ReportPath = Server.MapPath("~/Reporting/YourReportName.rdlc");
to:
rw.LocalReport.ReportEmbeddedResource = "YourFullNamespace.Reporting.YourReportName.rdlc";
And then change Build Action
property to Embedded Resource
from the properties of YourReportName.rdlc
file. Hope this helps...