【问题标题】:ReportDocument.ExportToDisk() exporting file as .html instead of .htmReportDocument.ExportToDisk() 将文件导出为 .html 而不是 .htm
【发布时间】:2013-12-09 14:26:20
【问题描述】:

我有这样的代码:

        if (ExportFormat == ExportFormatType.HTML32 || ExportFormat == ExportFormatType.HTML40)
        {
            string filename = Path.Combine("C:\exampleFile.htm"));
            _myReport.ExportToDisk(ExportFormat, filename);
        }

但是,出于某种奇怪的原因,即使我指定了 .htm,文件也总是导出为 .html 而不是 .htm。有谁知道这是什么原因?我在网上查了一下,但没有找到任何相关信息。

谢谢!

【问题讨论】:

    标签: html crystal-reports reportdocument


    【解决方案1】:

    您为什么不尝试一些不同的语法?显然,您在第 1 行中的条件评估不正确。所以尝试不同的变化,找出为什么它不评估。

    if (ExportFormat <> ExportFormatType.HTML32)
    {
    ExportFormat == ExportFormatType.HTML40;
    string filename = Path.Combine("C:\exampleFile.htm"));
    _myReport.ExportToDisk(ExportFormat, filename);
    }
    

    【讨论】:

      猜你喜欢
      • 2017-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多