[英]Delphi ReportBuilder how to liberate a file from TppTextPipeline
[英]No PDF output from ReportBuilder
我有一個ReportBuilder報告,預覽是按預期的。 我正在嘗試將其保存為pdf,並從文檔中獲取以下代碼:
ppReport1.ShowPrintDialog := false;
ppReport1.DeviceType := dtPDF;
ppReport1.TextFileName := 'C:\temp\report.pdf';
ppReport1.Print;
我在屏幕上看到一個對話框,說明它向給定文件輸出了幾頁,但是該文件無法在磁盤上找到。
我錯過了什么?
請嘗試檢查此屬性:
ppReport1.AllowPrintToFile := True;
它適用於我。
因此, Process Monitor向我顯示該文件已寫入,但隨后被刪除。 經過大量的源代碼瀏覽,我找到了原因。
EmailSettings
下有一個名為DeleteFile
的屬性。 由於某種原因,它也會影響打印到文件。
真奇怪。 我只是用這種方式:
ppReport1.AllowPrintToFile := True;
ppReport1.ShowPrintDialog := False;
ppReport1.DeviceType := 'PDF';
ppReport1.TextFileName := 'C:\temp\report.pdf';
ppReport1.Print;
(我在ReportBuilder v14.07上使用它)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.