#Custom SQL Server Reporting Services ReportViewer.aspx page
##Introduction Blog post can be [found here] (http://insomniacgeek.com/how-to-add-a-clear-button-to-sql-server-reporting-services-ssrs/ "InsomniacGeek")
If you ever had the need to add a clear / reset button to your standard SQL Server Reporting Services report viewer, here’s a way to do it. Normally when reports are displayed, they are piped through the ReportViewer.aspx page that comes with SSRS. This page hosts the Reporting Server host component, and adds text boxes, radio buttton etc. based on the number of parameters you have in your report.
This customized page will add this button that will clear any textboxes in the parameter field.
In the body tag, add a page onload event handler:
<body style="margin: 0px; overflow: auto" onload="addClearButton();">
##Disclaimer To accomplish this, you have to modify the ReportViewer.aspx OOB file from SSRS, which is not supported and probably not even recommended by Microsoft. So you are on your own. This customization has so far only been tested on SSRS 2008.
##Installation Backup your existing ReportViewer.aspx file before doing any modifications to it. Edit it (or replace it completely with the one from here) and that should be it. The file is by default installed at:
C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\Pages
But it of course depends on where you installed SSRS.
##License This software is publish under the MIT License
Copyright (C) 2012 Magnus Johanssson mailto:email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.