Using .NET Class as the DataSource with SSRS RDLC

Solution: Delete all contents and folder from Bin and Obj folder from your project directory and rebuild your solution.

I faced the same problem in Visual Studio 2015 with ASP.NET MVC5 when adding Data Sources of RDLC Report. Everything was working well when adding Data Sources in my current project. But suddenly in new reports I wasn't finding my project desired/updated/new classes as Data Sources in RDLC report data.

When I deleted all the contents from Bin and Obj folders of the current project, everything started working again


Here are a couple solutions, but I prefer the second one.

Solution 1 (okay)

As this appears to be a bug with the MVC Web Application project type itself, you can add the report to a different project type (like Class Library). As described in the post Visual Studio 2010 Report Viewer - Object Datasource, just create a separate library for the project and add the rdlc file there. The data source configuration wizard should now look like this:

data source configuration wizard

Solution 2 (better)

As figured out in Can't see or add Website Data Sources in RDLC report in ASP.NET MVC, you can just add an aspx page anywhere to the MVC project to trick Visual Studio into pulling in the right design time libraries.

Just do the following:

  • Close all windows
  • Clean & Rebuild Solution
  • Add WebForm1.aspx to the Project
  • Open up the RDLC file and choose a DataSource from the dropdown:

    DataSource Dropdown