Set parameter back to default value in SSRS

2019-08-09 15:12发布

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条回答
太酷不给撩
2楼-- · 2019-08-09 15:36

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.

查看更多
登录 后发表回答