[英]Passing a parameter from main report to drillthrough SQL Server Report Builder 3.0
I am trying to restrict what users can view based on the branch that they work in. I have it working on my main report but I want to pass the branch parameter from my main report to a drillthrough subreport. 我试图根据用户所在的分支来限制用户可以查看的内容。我在主报表上使用了它,但是我想将分支参数从主报表传递到钻取子报表。 How can I do this in Report Builder 3.0? 如何在Report Builder 3.0中做到这一点? Thank you. 谢谢。
You can pass the parameter via the url . 您可以通过url传递参数。
Example: 例:
http://myrshost/ReportServer?/AdventureWorks 2008R2/Employee_Sales_Summary_2008R2&ReportMonth=3&ReportYear=2008
Here we're passing the report parameter ReportMonth the value 3 and ReportYear with 2008 在这里,我们将报表参数ReportMonth的值传递给3,并将ReportYear传递给2008
An alternative to using a URL, you'd need the same parameters in both reports. 除了使用URL之外,在两个报告中都需要相同的参数。
If you don't want the user changing this parameter, in the drill-through report, you can simply hide this parameter in the drill-through report. 如果您不希望用户更改此参数,则可以在追溯报表中将其隐藏在追溯报表中。
This is by far the easiest way of doing what you require I believe. 我相信,这是迄今为止您所需要的最简单的方法。 Hope this helps if you're still struggling. 希望这对您仍然有帮助的人有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.