Using Shared Dataset in Subreport

試著忘記壹切 提交于 2019-12-23 09:03:04

问题


Greetings!

I am using SSRS with MS SQL Server 2008 R2, which has the new feature of supporting shared datasets.

First, I created my shared dataset, and made sure that it worked correctly and had a good connection. That worked great.

Second, I created a new report (Let's call it "ReportSub"), and I had it use my shared dataset. The report works great.

Third, I created another report (Let's call is "ReportMain"), and I put a subreport object into the report and associated it with "ReportSub". Doesn't work. Instead, I get this error:

Data retrieval failed for the subreport, 'ReportSub', located at: /ReportSub. Please check the log files for more information.

Any ideas of what the problem may be? It will work if I use an embedded dataset, but I really need to use a shared dataset.

Thanks,


回答1:


Currently, there is no way to Preview the subreport with shared datasource/dataset in BIDS.

Link: http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/74e51434-1d14-4fb1-9b1c-1a394c187b2f




回答2:


I had this problem for "preview" only. As soon as I deploy this to Reporting Service server it starts working fine.




回答3:


I had the same problem when previewing my MainReport. The SubReport preview works fine, but the MainReport preview produces the error "Data retrieval failed for the subreport".

The solution is not use shared dataset in the SubReport but an embedded daaset!

I have also observed that some changes in the SubReport are not taken over by the MainReport. So I had to close and repoen the project again.




回答4:


I was experiencing this problem even after deploying. I discovered that I was prompting for datasource credentials in the subreport, but not in the main report.

After I made them both the same (prompt for credentials or set them both to use the provided credentials), the problem went away and I was able to preview.



来源:https://stackoverflow.com/questions/2974587/using-shared-dataset-in-subreport

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!