Using Shared Dataset in Subreport
Greetings!
I am using SSRS w开发者_运维百科ith 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,
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
I had this problem for "preview" only. As soon as I deploy this to Reporting Service server it starts working fine.
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.
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.
精彩评论