Customising Export options in Crystal Report Viewer

I am using SAP crystal reports in Visual Studio 2010.I want to customise crystal report viewer export options. That is, I want to show only export to pdf,and to excel in my crystal report viewer.
How I can do this

asked Jan 11, 2012 at 11:26 Shamim Shams Shamim Shams 181 1 1 silver badge 9 9 bronze badges possible duplicate of Crystal Report Viewer - Programmatically restricting File Format options Commented May 29, 2013 at 9:16

3 Answers 3

Your can restrict the ReportViewer in 13.0.x using:

ReportViewer.AllowedExportFormats = (int)(ViewerExportFormats.ExcelFormat | ViewerExportFormats.PdfFormat); 
answered May 29, 2012 at 22:00 Nick Gotch Nick Gotch 9,387 14 14 gold badges 72 72 silver badges 99 99 bronze badges

First of all include below namespace on top of your code behind:

using CrystalDecisions.Shared;

then,write below code in your page load event as:

protected void Page_Load(object sender, EventArgs e)

 CrystalReportViewer2.AllowedExportFormats = (int) (ViewerExportFormats.ExcelRecordFormat | ViewerExportFormats.PdfFormat); >