开发者

Missing show/Add Data Source

Any help will be appreciated,

I am using Visual studio 2010 and currently I am making a project in ASP.net mvc3. In this project I have .edmx data sets and want to use that for making .rdlc report. So fnally I couldn't get开发者_StackOverflow the show data source in the data menu of the report design. What is wrong? And what is the possible solution?


I went though the same problem than you and came up with a solution that may not be the best choice, but it's working.

First, it appear that you can't create DataSources in a MVC project. I don't know the reason for that, but I think it's linked to the fact that it must contain an unique connection in your application to a database (just a wild guess).

Anyway, the solution we came up here was that we created another project in the same solution of the MVC project, and created our Data Sources and Reports that were based on those data sources, in this new project.

I know it's not a pretty solution, but it did the trick for us.


You will not only have to use an asp.net page but

If using the Entity Framework or LinqToSql (if using partial classes) move the data into a separate project, the report creator cannot see the classes.

Move the reports to another project/dll, VS10 has bugs were asp.net projects cannot see object datasources in web apps. Then stream the reports from the dll into your mvc projects aspx page.

This applies for mvc and webform projects. Using sql reports in the local mode is not a pleasent development experience. Also watch your webserver memory if exporting large reports. The reportviewer/export is very poorly designed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜