This is a migrated thread and some comments may be shown as answers.

Allow only export to excel in ReportViewer

1 Answer 400 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
pradeep
Top achievements
Rank 1
pradeep asked on 19 Oct 2011, 02:47 PM
Hi,

I want to remove all the other option except "Excel" from the export dropdown of a telerik report viewer control.

Appreciate sample code.

Regards,
Pradeep K S

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 21 Oct 2011, 03:07 PM
Hello Pradeep,

In order to edit the export options in the drop down list of the Telerik ReportViewer you have to reconfigure the Telerik Reporting settings. You can do this in the configuration file of your application. For more information you can check the Telerik Reporting Configuration Section help article.

Please find below a sample code that accomplishes your goals. You have to know that  <configSections> must be the first child element in the <configuration> element. Also I saw that the version you are using is 5.1.11.928 so I updated this for you. Basically you can just copy-paste this code in your app.config or web.config.
<configuration>
  <configSections>
    <section
            name="Telerik.Reporting"
            type="Telerik.Reporting.Processing.Config.ReportingConfigurationSection, Telerik.Reporting, Version=5.1.11.928, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
            allowLocation="true"
            allowDefinition="Everywhere"/>
  </configSections>
 
  <Telerik.Reporting>
    <Extensions>
      <Render>
        <Extension name="IMAGE" visible="false"/>
        <Extension name="PDF" visible="false"/>
        <Extension name="HTML" visible="false"/>
        <Extension name="MHTML" visible="false"/>
        <Extension name="CSV" visible="false"/>
        <Extension name="RTF" visible="false"/>
        <Extension name="XPS" visible="false"/>
        <Extension name="DOCX" visible="false"/>
        <Extension name="XLS" visible="false"/>
        <Extension name="PPTX" visible="false"/>
      </Render>
    </Extensions>
  </Telerik.Reporting>
 
....
 
</configuration>
Greetings,
IvanY
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
pradeep
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or