我有一個表格可以列印一些使用 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();
uj5u.com熱心網友回復:
我將列印件移動到盡可能多的 BackgroundWorkers,顯然一切都非常快,即使我不知道這是否是最佳解決方案。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/344732.html
