Search code examples
c#asp.netasp.net-mvctelerikkendo-asp.net-mvc

How to do Show/Hide Export Option in Telerik Report Viewer?


I need to show or hide the export option in telerik report view. I am using asp.net mvc for development. Based on the condition i need to show or hide the export option in the telerik report viewer tool bar. The bellow code i used for hide the button but no use.

Telerik.ReportViewer.WebForms.ReportViewer viewer = new Telerik.ReportViewer.WebForms.ReportViewer(); viewer.ShowExportGroup= false;

Can any one try to help me.


Solution

  • By default the report viewers would show all supported rendering extensions in a combo box within the ReportViewers' toolbar. The available rendering extensions are listed in the Rendering Extensions help article.

    In Telerik Reporting, device information settings are used to pass rendering parameters to a rendering extension. You can specify device information settings in a variety of ways. You can use the configuration section to specify rendering parameters globally. Programmatically, you can use the ReportProcessor.RenderReport() method. For more information about specifying rendering parameters globally, see Configuring Telerik Reporting.

    The example below shows a sample application configuration file where the RTF rendering extension would not be visible:

    NOTE: The XPS rendering extension requires the Telerik.Reporting.XpsRendering.dll assembly. DOCX/PPTX/XLSX rendering extensions require Telerik.Reporting.OpenXmlRendering.dll and Open XML SDK 2.0 for Microsoft Office (DocumentFormat.OpenXml.dll v.2.0.5022.0 or above).

    You can find more information at https://www.telerik.com/support/kb/reporting/details/limit-export-options-in-reportviewer-to-certain-format-only https://www.telerik.com/forums/html5-report-viewer-reduce-export-options https://www.telerik.com/forums/restrict-export-type-options#2823935