Click here to Skip to main content
Click here to Skip to main content

Tagged as

SSRS - Report Viewer - Hide PDF Export option

, 13 Nov 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
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.

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

Enable the PDF export option - remove the visible attribute.

<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)

Share

About the Author

Chirag Vidani
Software Developer (Senior) Cygnet Infotech Pvt. Ltd.
India India
No Biography provided
Follow on   Twitter

Comments and Discussions

 
GeneralReason for my vote of 1 No code sample included. Pinmemberseldi10-Dec-11 7:21 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 13 Nov 2011
Article Copyright 2011 by Chirag Vidani
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid