- Open Visual Studio 2012
- Create a new ASP.NET Web Forms Application (This is the critical choice to make this break)
- Create a report and call it Report1.rdlc
- Open your default page. The master page should have a Script Manager on it already. If it doesn't then you will need to add it.
- Drag the ReportViewer control from the Toolbox to the content area on the Default page (or other page).
- Use the SmartTag (the little box with a triangle in it on the upper right corner of the ReportViewer control to choose your report. This will create an ObjectDataSource with the improper configured.
- You can verify the ObjectDataSource is configured improperly by clicking the Refresh Schema task on the Smart Tag of the ObjectDataSource. It will generate an error similar to:
The 'AdventureWorks2008R2DataSetTableAdapters.SalesOrderDetailTableAdapter' could not be loaded. If the type is located in teh App_Code folder, please check that it compiles. If the type is located in a complied assembly, please check that the assembly is referenced by the project.
The type 'AdventureWorks2008R2DataSetTableAdapters.SalesOrderDetailsTableAdapter' could not be found'
- Reconfigure the ObjectDataSource and you will see that the problem is that it should have the namespace before the type (that it can't find). It is as if the Microsoft developer that did this functionality didn't realize the ObjectDataSource that would be created is different depending if you are using a ASP.NET Web Forms Application or a ASP.NET Web Forms Site.
An error occurred during local report processing.The report definition for report 'Report1' has not been specified Object reference not set to an instance of an object.
- Do everything in code.
- Don't use the smart tag - Create the ObjectDataSource first and make the bindings to the Collection and ReportPath yourself using the Properties panel (not the smart tag since the bug seems to be in the Smart Tag of the ReportViewer).