SSRS 2008 - 错误:无法显示子报告
我使用 SQL Server Business Intelligence Studio 创建了 Reporting Services 2008 项目。一切都在顺利进行,直到我尝试创建子报表,这导致我遇到了熟悉的错误:
错误:无法显示子报表
是的,如果单独运行,主报表和子报表可以工作。当我将子报表添加到主报表时,主报表运行正常,而子报表返回错误。
两个报告都是从单独的存储过程运行的。驱动两个报告的数据源包含两个过程。
子报表只有一个参数。我尝试测试静态值,因此添加了参数(右键单击子报表,选择“属性”,选择“参数”选项卡,然后添加值为 =(16102) 的正确参数名称)。
如果我向主报表添加一个没有参数的子报表 - 子报表仅打印一个字符串,用于测试目的 - 那么该子报表将正确显示。
有什么至理名言吗?
I have used SQL Server Business Intelligence Studio to create a Reporting Services 2008 project. Everything was moving right along until I tried to create a subreport, which led me to the familiar error:
Error: Subreport could not be shown
Yep, the main report and subreport work if run seperately. When I add the subreport to the main report, the main report runs fine and the subreport returns the error.
Both reports are run from seperate stored procedures. The data source which drives both reports contains both procedures.
The subreport has a single parameter. I have tried testing a static value, so I've added the parameter (right click on the subreport, select Properties, chose the Parameters tab, and added the correct parameter name with a value of =(16102)).
If I add a subreport that has no parameters to the main report - the subreport just prints a string, for testing purposes - then that subreport displays correctly.
Any words of wisdom?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我解决了这个问题。我的解决方案是使用正确的项目类型。我错过了新项目类型列表顶部的“商业智能项目”,而是使用 Visual Basic\Reporting\Reports Application。当我使用 BIP/Report Server Project 项目类型时,我能够成功显示子报表。
I resolved the issue. My solution was to use the right project type. I missed the "Business Intelligence Projects" at the top of the list of new project types, and instead was using Visual Basic\Reporting\Reports Application. When I use the BIP/Report Server Project project type, then I was able to get the subreports to be displayed successfully.
我刚刚遇到了一个非常相似的问题,
我的问题是由使用快照运行的子报表引起的。一旦我禁用快照,一切就正常了。
看起来快照在子报表中不兼容。
希望这对其他人有帮助。
I just had a very similar issue,
My issue was caused by the subreport being run using a Snapshot. As soon as I disabled the snapshot, everything worked.
Looks like Snapshots are not compatible in Subreports.
Hope this helps someone else.