【问题标题】:Crystal report too slow from Visual Studio 2019 and WinformsVisual Studio 2019 和 Winforms 的 Crystal 报告太慢
【发布时间】:2021-12-14 06:14:00
【问题描述】:

我有一个表单,可以打印使用 Crystal Report (13.030) 和 Visual Studio 2019 创建的一些报表。打印每个报表大约需要 5/8 秒。我已经尝试了在谷歌上找到的所有建议,但没有解决任何问题。由于报告大约有 10m,因此客户必须等待很长时间才能继续。

我知道这是一个已知问题,但我不知道如何解决它。我一直在考虑在 BackgroundWorker 中进行打印,但我不确定这是否是个好主意。

我选中了报告框中没有打印机。这是我的报告之一,它们都非常相似。我有什么不对吗?

ReportDocument myReport = new ReportDocument();                           
myReport.Load("myreport.rpt");
PrintLayoutSettings PrintLayout = new PrintLayoutSettings();
PrinterSettings printerSettings = new PrinterSettings();
printerSettings.PrinterName = "PDF Creator"; // Any;
PageSettings pSettings = new PageSettings(printerSettings);

myReport.SetParameterValue("var1", "123"); 
myReport.SetParameterValue("var2", "ABC"); 
myReport.SetParameterValue("var3", "DEF"); 

myReport.PrintToPrinter(printerSettings, pSettings, false, PrintLayout);

myReport.Close();

【问题讨论】:

  • 为什么是-1?它应该证明它是合理的。
  • Crystal 报告是付费产品,如果基本报告需要很长时间,与他们交谈是有意义的,不,他们将是调试您问题的最佳人选?
  • 我使用的版本是与Visual Studio 2019集成的,没有付费,但是我已经尝试过了,他们没有给我任何解决方案。我希望其他人和我有同样的问题并且可以帮助我。
  • 祝你好运:)

标签: c# winforms crystal-reports


【解决方案1】:

我将打印件移至尽可能多的 BackgroundWorkers,显然一切都非常快,即使我不知道这是否是最佳解决方案。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-22
    • 1970-01-01
    相关资源
    最近更新 更多