[英]Crystal report too slow from Visual Studio 2019 and Winforms
I have a form that prints some reports created with Crystal Report (13.030) and Visual Studio 2019. The printing of each report takes about 5/8 seconds.我有一个表格可以打印一些使用 Crystal Report (13.030) 和 Visual Studio 2019 创建的报告。每个报告的打印大约需要 5/8 秒。 I have tried all the suggestions found on google, but have not solved anything.
我已经尝试了在 google 上找到的所有建议,但没有解决任何问题。 Since the reports are about 10m, the customer has to wait a long time before being able to continue.
由于报告在10m左右,客户必须等待很长时间才能继续。
I have read that it is a known problem, but I don't know how to fix it.我已经读到这是一个已知问题,但我不知道如何解决它。 I've been thinking about doing the prints in a BackgroundWorker, but I'm not sure if that's a good idea.
我一直在考虑在 BackgroundWorker 中进行打印,但我不确定这是否是个好主意。
I checked the No printer in report box.我检查了报告框中没有打印机。 This is one of my reports, which are all very similar.
这是我的一份报告,它们都非常相似。 Am I wrong something?
我错了吗?
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();
我将打印件移动到尽可能多的 BackgroundWorkers,显然一切都非常快,即使我不知道这是否是最佳解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.