none
Disable Excel Export RRS feed

  • Question

  • Hello

     

    can someone tell me if it's possible to completly remove the Export to Excel entry from the export functionality? PDF is the only needed and the export to excel gets messed up, so i'd like to remove it. 

    I use repViewer_ReportExport event to show a Message at the time and setting e.Cancel=true... but i'd like not to show the choice at all.

     

    _rene

    Tuesday, March 23, 2010 6:38 AM

Answers

  • You can set ShowExportButton to false to hide the built-in export option.  You could then add your own button to the form that only performs PDF export.  Unfortunately there is no way to add a custom button the built-in viewer toolbar.

    Exporting can be done manually by calling ReportViewer.LocalReport.Render(), then launching a save dialog.  If you are using VS 2010, it's even easier with the new ReportViewer.ExportDialog() method.

    • Marked as answer by rene.marxis Tuesday, March 23, 2010 10:28 PM
    Tuesday, March 23, 2010 4:01 PM
    Moderator

All replies

  • You can set ShowExportButton to false to hide the built-in export option.  You could then add your own button to the form that only performs PDF export.  Unfortunately there is no way to add a custom button the built-in viewer toolbar.

    Exporting can be done manually by calling ReportViewer.LocalReport.Render(), then launching a save dialog.  If you are using VS 2010, it's even easier with the new ReportViewer.ExportDialog() method.

    • Marked as answer by rene.marxis Tuesday, March 23, 2010 10:28 PM
    Tuesday, March 23, 2010 4:01 PM
    Moderator
  • Thanks
    Tuesday, March 23, 2010 10:29 PM