Visual Studio 2010 Local SSRS Report (.rdlc) with Object Data Source

后端 未结 6 1224
谎友^
谎友^ 2020-12-16 11:59

I\'ve created more projects using ReportViewer 2005 and 2008 in local processing mode than I can count on my hands. All Visual Studio 2005 or 2008 ASP.NET web forms projects

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 12:53

    Here are a couple solutions. Number two is much better as it doesn't require needlessly duplicating your assemblies.

    Solution 1 (okay)

    As added to the question itself and 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. This appears to be a bug with the MVC Web Application project type itself so any other project type (like a Class Library) should work. 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 in order 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

提交回复
热议问题