Click here to Skip to main content
15,891,777 members
Articles / Database Development / SQL Server
Tip/Trick

SSRS - Report Viewer - Hide PDF Export option

Rate me:
Please Sign up or sign in to vote.
2.83/5 (4 votes)
13 Nov 2011CPOL 41.1K   4   1
How to hide PDF Export option in Report Viewer

Introduction


SQL Server Reporting Services eases designing of reports, whereas the Microsoft Report Viewer control is used to display .rdl/.rdlc reports in an ASP.NET website.


Moreover, the report viewer control provides various options in its toolbar. Of the different options, one option provides functionality for exporting the report in different formats (like XML, CSV, Word, Excel, PDF ...).


Now what if you want to exclude any/all of the above options?


Say, if I want to hide the PDF export option from the Report Viewer toolbar. Below are the steps to do:


Solution


Step - 1


Locate the file name "RSReportDesigner.config" at
"Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\RSReportDesigner.config".


Note: Location of the file varies in different version of SQL Server.


Step - 2


Disable the PDF export option - add the visible attribute with value false.


XML
<extension name="PDF" 
  type="Microsoft.ReportingServices.Rendering.ImageRenderer.
        PDFRenderer,Microsoft.ReportingServices.ImageRendering" 
   visible="false" />

Enable the PDF export option - remove the visible attribute.


XML
<extension name="PDF" 
  type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,
        Microsoft.ReportingServices.ImageRendering" />

Step - 3


After this, you need to restart your Report Server.


Conclusion


This can be applied to other exporting options too.


Read More...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Cygnet Infotech Pvt. Ltd.
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralReason for my vote of 1 No code sample included. Pin
seldi10-Dec-11 6:21
seldi10-Dec-11 6:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.