Set parameter back to default value in SSRS

雨燕双飞 提交于 2019-12-11 13:50:45

问题


Is there a way that a parameter value can be reset to it's default once the 'view report' button has been pressed.

I have a report with a free text input parameter that inserts users comments into a sub report contained within this report. They add their notes then hit view report, this re runs the report with their notes visible. The only problem is that the parameter box still contains the note they added previously - I've set the parameter to have a default value of ' ' which works the first time it's loaded but not once any text has been added.

I've added a 'clear comment' text box with an action of 'go to report' which simply loads the same report and clears it, but I was hoping there was something I could do that was little bit smoother.

Thanks


回答1:


A straight up answer to your question would be (AFAIK) that this isn't (easily) possible.


On a related note, I think you'll have a hard time smoothening your current setup, because reports aren't designed for this task; you seem to be trying to use the report as a web form and as a report at the same time.

I would suggest a different approach to your task. You don't mention how you currently deliver the report, but a setup with for example an asp.net web page containing some input fields, a custom "view report" button (that makes sure the input lands in the report, possibly via the database) and a ReportViewer control, may work a lot better.



来源:https://stackoverflow.com/questions/16234761/set-parameter-back-to-default-value-in-ssrs

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