简体   繁体   English

根据SSRS中的参数值显示不同的报告

[英]Display Different report based on a parameter value in SSRS

We have an SSRS Report which uses user authentication . 我们有一个使用user authenticationSSRS Report I have requirement as below 我有如下要求

If an unauthorized user login to see SSRS Report, He/She should only see the "You are not authorized error" message. 如果未经授权的用户登录以查看SSRS报告,则他/她应仅看到“您未被授权的错误”消息。 He/She should not have any visibility to report parameters or any other report elements. 他/她不应对报告参数或任何其他报告元素具有任何可见性。

Below is what I have done. 以下是我所做的。

I Created a new parameter in the report to store the user-access value. 我在报表中创建了一个新parameter来存储user-access值。 If the value is 'Y' report will be shown. 如果值为“ Y”,将显示report Else hide the report and show only the tablix with the error message. 否则隐藏报告,仅显示带有错误消息的tablix However, parameter panel is visible in both cases. 但是,在两种情况下, parameter panel都是可见的。 I need the parameter panel to be hidden in the Report when the error message displays. 显示错误消息时,我需要将参数面板hidden在报告中。

Is it possible to call a sub-report and show it with hidden parameters if the user-access parameter value set as "N" instead of actual report? 如果用户访问参数值设置为“ N”而不是实际报告,则可以调用sub-report并使用hidden parameters显示它吗?

Thanks baiju 谢谢baiju

Is it possible to call a sub-report and show it with hidden parameters if the user-access parameter value set as "N" instead of actual report? 如果用户访问参数值设置为“ N”而不是实际报告,则可以调用子报告并使用隐藏参数显示它吗?

Yes, sort of. 是的,有点。 What you would actually do is have both reports be sub-reports. 您实际要做的是将两个报告都作为子报告。 Your main report would just be a wrapper for the sub-reports, and the parameter would determine which sub-report you show. 您的主报表将只是子报表的包装,而参数将确定您显示的子报表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM