【问题标题】:Customising Export options in Crystal Report Viewer在 Crystal Report Viewer 中自定义导出选项
【发布时间】:2012-02-07 18:13:21
【问题描述】:

我在 Visual Studio 2010 中使用 SAP 水晶报表。我想自定义水晶报表查看器 导出选项。也就是说,我只想显示导出为 pdf,并在我的水晶报表查看器中表现出色。
我该怎么做呢

【问题讨论】:

标签: crystal-reports


【解决方案1】:

您可以使用以下方法限制 13.0.x 中的 ReportViewer:

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

【讨论】:

    【解决方案2】:

    首先在你的代码后面包含下面的命名空间:

    使用 CrystalDecisions.Shared;

    然后,在您的页面加载事件中编写以下代码:

    protected void Page_Load(object sender, EventArgs e) {

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

    【讨论】:

      【解决方案3】:

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-10-08
        • 1970-01-01
        • 1970-01-01
        • 2019-03-06
        • 1970-01-01
        • 2016-04-09
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多