Skip to main content

SSRS Reports - How to Hide/Disable the atomFeed/ Datafeed icon on SSRS ReportViewer page?

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
.ToolbarAtomDataFeed

{
          display: inline;
}

Change it to

.ToolbarAtomDataFeed
{
          display: none;
}
Save the file. 

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!

Comments

  1. In my version, I am not finding the MSR10_50 folder. My HtmViewer stylesheet was in this folder:
    C:\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?



    ReplyDelete
  2. 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

Post a Comment

Popular posts from this blog

SSRS Reports - Space/Gap issue between the objects in SSRS Reports

In Reports where some objects are set to be shown/hide based on some expression/filter condition etc. There Could be some white space issue between the objects on the report( i.e. when few objects are hidden in the report, the white space between the objects will accumulate and displayed as a big gap between the objects on the report). Following are few ways using which we can handle this kind of issue: 1. Remove the Gap between the objects in the report layout. 2. Or put a text box and make the border the same as the background color and apply the same show/hide action on it. 3. If you are using a table/matrix then instead of putting the space between objects, just add one static row above the column header for the table/matrix and make the border color the same background color. below is one approach: The report before any space handling: -----------------------------------------------------------------------------  Report Preview when all the o...

SSRS Reports - When few objects are hidden in the report, the white space between the objects will accumulate and displayed as a big gap between the objects on the report

In Reports where some objects are set to be shown/hide based on some expression/filter condition etc. There Could be some white space issue between the objects on the report( i.e. when few objects are hidden in the report, the white space between the objects will accumulate and displayed as a big gap between the objects on the report). Following are few ways using which we can handle this kind of issue: 1. Remove the Gap between the objects in the report layout. 2. Or put a text box and make the border the same as the background color and apply the same show/hide action on it. 3. If you are using a table/matrix then instead of putting the space between objects, just add one static row above the column header for the table/matrix and make the border color the same background color. below is one approach: The report before any space handling: -----------------------------------------------------------------------------  Report Preview when all the obj...

How to do Error Handling for Transaction using Try Catch Block

Issue : Some time we get requirements where we have to use transaction to do some DML operations to make sure the unit of work should be done completely. But there could be error while doing this. So, how we can cope up with errors to achieving this? Solution: We can use Transaction in the Try Catch block to make sure that the transaction either successful or rollback if there is any error. Below is an example for this: BEGIN TRY --Start the Try Block.. BEGIN TRANSACTION -- Start the transaction.. UPDATE [dbo] . [Table] SET salary = salary * 1.1 WHERE MID = 6 --DML operations to be done in the transaction COMMIT TRAN -- Transaction Success! END TRY --End of the Try Block BEGIN CATCH --Start the Catch Block IF @@TRANCOUNT > 0 --check the error count for the errors ROLLBACK TRAN --RollBack in case of Error --to raise the error message when there is an issue. Declare the variables and se the values for them DECLARE @Er...