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
Your can restrict the ReportViewer in 13.0.x using:
ReportViewer.AllowedExportFormats = (int)(ViewerExportFormats.ExcelFormat | ViewerExportFormats.PdfFormat);
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);
}
this.crystalReportViewer1.AllowedExportFormats = (int)CrystalDecisions.Shared.ViewerExportFormats.PdfFormat;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With