【发布时间】:2012-02-07 18:13:21
【问题描述】:
我在 Visual Studio 2010 中使用 SAP 水晶报表。我想自定义水晶报表查看器
导出选项。也就是说,我只想显示导出为 pdf,并在我的水晶报表查看器中表现出色。
我该怎么做呢
【问题讨论】:
标签: crystal-reports
我在 Visual Studio 2010 中使用 SAP 水晶报表。我想自定义水晶报表查看器
导出选项。也就是说,我只想显示导出为 pdf,并在我的水晶报表查看器中表现出色。
我该怎么做呢
【问题讨论】:
标签: crystal-reports
您可以使用以下方法限制 13.0.x 中的 ReportViewer:
ReportViewer.AllowedExportFormats = (int)(ViewerExportFormats.ExcelFormat | ViewerExportFormats.PdfFormat);
【讨论】:
首先在你的代码后面包含下面的命名空间:
使用 CrystalDecisions.Shared;
然后,在您的页面加载事件中编写以下代码:
protected void Page_Load(object sender, EventArgs e) {
CrystalReportViewer2.AllowedExportFormats = (int) (ViewerExportFormats.ExcelRecordFormat | ViewerExportFormats.PdfFormat);
}
【讨论】:
this.crystalReportViewer1.AllowedExportFormats = (int)CrystalDecisions.Shared.ViewerExportFormats.PdfFormat;
【讨论】: