(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

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.