Dynamic subreport in SSRS 2008

我怕爱的太早我们不能终老 提交于 2019-12-24 08:25:10

问题


I would like to set up a dashboard report in SSRS that contains a bunch of sub reports, but have the reports that are displayed be configurable at run time.

I.E. there could be 4 parameters which represent the names of 4 reports. The report contains 4 reports, and the name of each sub report should be taken from one of the parameters.

It looks like I can't do this, as the 'Use this report as a subreport' property is a dropdown and doesn't provide a way of configuring it as an expression.

Am I right?

Thanks, Rich


回答1:


I figure your scenario is just to display one at a time. I needed to do almost the same thing. I have a main report in which I wanted a dynamic number of different subs to be displayed. I solved it like this:

  • A main report (Main) with a tablix containing a subreport (SubMain), the dataset for Main passes id, subid and subtype. SubMain has no dataset.
  • And directly in the SubMain I added all my subs (SubDetail) which have their own dataset. And then I set visibilty for SubDetails depending on type. /Erik



回答2:


Normally you'd have to define each subreport in the main report and then set visibility. Or use drill through to emulate navigation.



来源:https://stackoverflow.com/questions/891898/dynamic-subreport-in-ssrs-2008

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