6499afa185b8d2d36015f589d14fecd9619fd94d
FAQ/Questions/Hiding-report-list-button.md
| ... | ... | @@ -0,0 +1,26 @@ |
| 1 | +#Hiding the Report List Button |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##Question |
|
| 6 | + |
|
| 7 | +How can I hide the report list button on the report viewer? |
|
| 8 | + |
|
| 9 | +##Answer |
|
| 10 | + |
|
| 11 | +Prior to version 6.7 you could modify it via the code-behind by adding this code to your ReportViewer.aspx.cs: |
|
| 12 | + |
|
| 13 | +```csharp |
|
| 14 | +HtmlOutputReportResults1.FindControl("ReportListButton").Visible = false; |
|
| 15 | +``` |
|
| 16 | + |
|
| 17 | +For version 6.7 and later, you can directly hide this button in your HTML by locating the ReportViewer-Body.aspx page in the downloadable demo site and locate the following line: |
|
| 18 | + |
|
| 19 | +```html |
|
| 20 | + <a class="btn" id="rlhref" href="ReportList.aspx" lang-title="js_Reportlist" title="Report list"> |
|
| 21 | + <img class="icon" src="rs.aspx?image=ModernImages.report-list.png" lang-alt="js_Reportlist" alt="Report list" /> |
|
| 22 | + <span class="hide" lang-text="js_Reportlist">Report list</span> |
|
| 23 | + </a> |
|
| 24 | +``` |
|
| 25 | + |
|
| 26 | +If you set "display:none;" in the style tag of the ``<a>`` element, you can hide it for all users. You could also wrap the element in a ``<%= %>``` server tag and specify a condition for when to display this button and when not to. |
|
| ... | ... | \ No newline at end of file |