Transferred from: http://www.cnblogs.com/ljx2012/p/4093474.html
A group of friends in the use of VS2012 to do data reports, always prompt
An error occurred during local report processing.
Report definition for report "Report1" has not been specified
Object references are not set to an instance of an object.
I looked, step right, I used VS2010 did a bit, everything OK, no problem, but with VS2013 do,
Just prompt for this error
After a careful look at the design generated by the source, hey, there is really a difference in VS2012 and VS2013,
ReportViewer generated code uses the Reportembeddedresource property when referencing the report data
<localreport reportembeddedresource= "WEBAPPLICATION1.REPORT1.RDLC" >
<DataSources>
<rsweb:reportdatasource datasourceid= "ObjectDataSource1" name= "DataSet1"/>
</DataSources>
</LocalReport>
Used in the VS2010 version is the Reportpath
<localreport reportpath= "REPORT1.RDLC" >
<DataSources>
<rsweb:reportdatasource datasourceid= "ObjectDataSource1" name= "DataSet1"/>
</DataSources>
</LocalReport>
The difference between Reportpath and Reportembeddedresource is:
Reportpath is the local file system path that gets or sets the local report.
Setting the Reportpath property causes the ReportViewer control to automatically load any required subreports from the file system.
Setting this property causes the value of the Reportembeddedresource property to be ignored
Reportembeddedresource is a report definition that is embedded in a report resource that is already stored as a resource in the calling assembly.
Because to manually modify the use of Reportpath, this problem can be solved
I reportembeddedresource the VS2008 website to reportpath= "REPORT1.RDLC" can also
(go) When you do a data report in a version after VS2012, you are prompted that the report definition for report "Report1" has not been specified