How to stop Reporting Services report from rendering automatically on startup?

耗尽温柔 提交于 2020-01-14 21:47:48

问题


I notice that if a report has default values specified to all its parameters then it renders automatically on startup. How can I prevent this? that is, I don't want the report to be rendered until the user clicks the 'view report' button


回答1:


There is no way to stop the report rendering if all parameters have default values.

The only way to stop the report rendering automatically is to have at least one parameter without a default value.




回答2:


I have achieved from the below solution:

If you are using ReportViewer its posible to set the property ShowReportBody="False". Then on the OnSubmittingParameterValues event, change the ShowReportBody property to true. Then you do not need any extra parameters or parameters without default value in the report.

<rsweb:ReportViewer 
        ID="_rv" 
        runat="server"  
        Width="100%" 
        Height="100%" 
        ShowReportBody="False"
        ShowPrintButton="false"
        OnSubmittingParameterValues="rv_SubmitParamValues"/>

And then in rv_SubmitParamValuesmethod:

this.rv.ShowReportBody = true;


来源:https://stackoverflow.com/questions/6820679/how-to-stop-reporting-services-report-from-rendering-automatically-on-startup

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