I got a requirement for a dashboard in which the end user doesn't want the datafeed icon to be displayed on the Report because of the crucial data in the report. His concern was if by mistake some body click on the datafeed icon all the data will be available publicly.
As this requirement is only for one report, so the challenge was how to disable the datafeed icon for that particular report.
There is one parameter (&rc:Stylesheet) which is useful in this case.
Let’s see how it work:
to customize the toolbar for the ReportViewer
1. Open the directory at the following location of your Microsoft SQL server installation:
<drive>:\Program Files\Microsoft SQL Server\MSRS10_50.<InstanceName>\Reporting Services\ReportServer\Styles
2. Create a copy of the file “HtmlViewer.css” in the same folder and name it "CustomHtmlViewer.css".
3. Open “CustomHtmlViewer.css”, find the section
Change it to
.ToolbarAtomDataFeed
{
display: none;
}
Save the file.
4. Now in the link of the Report pass the parameter for the stylesheet:
and you will see that the datafeed icon is gone from your ReportViewer toolbar for this report.
Few points to remember:
1. To modify the "HtmlViewer.css" file you have admin rights on that machine where the SQL server is installed.
2. Pass the newly created stylesheet name as parameter in the link.
3. Don’t add the .css extension in the stylesheet name in the link.
4. Note: we only want to disable the datafeed icon for a single report, so we are not going to modify the ReportServer.config file.
For more details check the Link on MSDN:
http://msdn.microsoft.com/en-us/library/ms345247(v=SQL.105).aspx
Hope this will help!
As this requirement is only for one report, so the challenge was how to disable the datafeed icon for that particular report.
There is one parameter (&rc:Stylesheet) which is useful in this case.
Let’s see how it work:
to customize the toolbar for the ReportViewer
1. Open the directory at the following location of your Microsoft SQL server installation:
<drive>:\Program Files\Microsoft SQL Server\MSRS10_50.<InstanceName>\Reporting Services\ReportServer\Styles
2. Create a copy of the file “HtmlViewer.css” in the same folder and name it "CustomHtmlViewer.css".
3. Open “CustomHtmlViewer.css”, find the section
.ToolbarAtomDataFeed
{
display: inline;
}
{
display: inline;
}
.ToolbarAtomDataFeed
{
display: none;
}
4. Now in the link of the Report pass the parameter for the stylesheet:
http://<ServerName>/ReportServer/Pages/ReportViewer.aspx?%<FolderName>%2<ReportName>&rc%3aStylesheet=CustomHtmlViewer
and you will see that the datafeed icon is gone from your ReportViewer toolbar for this report.
Before disabling the datafeed icon
After disabling the datafeed icon
Few points to remember:
1. To modify the "HtmlViewer.css" file you have admin rights on that machine where the SQL server is installed.
2. Pass the newly created stylesheet name as parameter in the link.
3. Don’t add the .css extension in the stylesheet name in the link.
4. Note: we only want to disable the datafeed icon for a single report, so we are not going to modify the ReportServer.config file.
For more details check the Link on MSDN:
http://msdn.microsoft.com/en-us/library/ms345247(v=SQL.105).aspx
Hope this will help!
In my version, I am not finding the MSR10_50 folder. My HtmViewer stylesheet was in this folder:
ReplyDeleteC:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\Styles. Once I located the htmlviewer.css, my copy does not have the ToolbarAtomDataFeed property. I am using Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE.
However, on the same machine, I also have SSRS 2005 installed (because I prefer designing in it). Could this be the problem?
Product feeds are created to alert search portals and comparison shopping engines about updates to products that are piece of a web based shop's list. data feed optimization
ReplyDelete