【发布时间】:2021-10-20 07:49:59
【问题描述】:
我正在努力将 Crystal Report 导出到 Word 文档。
我正在使用以下代码创建报告:
using (ReportDocument initRep = report.SetUpReportDocument(rep, loadId))
{
string filePath = @"C:\word2Pdf\";
string fileName = Guid.NewGuid().ToString() + "wordReport.doc";
var fileNameAndPath = filePath + fileName;
initRep.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows, fileNameAndPath);
}
问题出在这里,在这行代码上:
initRep.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows, fileNameAndPath);
这需要很长时间,没有任何错误。
我的报告有 4 个子报告,它们链接到具有唯一 ID (loadId) 的主报告。
我一直在研究很多 here 或 even here 和 ...
当我使用 SQL Server Profiler 检查时,我发现查询没有暂停,而且查询似乎在尖叫循环中运行。 我真的需要这个来导出,SOS。
【问题讨论】:
标签: c# asp.net asp.net-mvc crystal-reports webapi