6
votes

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

3

3 Answers

5
votes

Your can restrict the ReportViewer in 13.0.x using:

ReportViewer.AllowedExportFormats = (int)(ViewerExportFormats.ExcelFormat | ViewerExportFormats.PdfFormat);
4
votes

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

    }
1
votes

this.crystalReportViewer1.AllowedExportFormats = (int)CrystalDecisions.Shared.ViewerExportFormats.PdfFormat;