QuickReport中用QRRichText打印出现末尾一行在后页中重复
小丁用QRRichText放在Detail的Band上,打印长篇文章时候,发现每一页末一行会在后一页的头一行重复,花了小丁半个月的时间,后来在QuickReport的帮助文件的知识库中发现,说这是微软的Riched32.DLL动态联结库的BUG,推荐的解决的方法有二:
1.每页的末尾一行留空(真不是东西,要最终用户来如此解决)
2.用一种编程的手段解决.
如下所示:
. My RTF field doesn't consistently print out the last line in the memo.
A. This is known problem with the MS RichText common control. There are two works arounds. One is to add an extra blank line to the text, the other is to set the OnGenerateToPrint event of the report's qrprinter object to nil. This will force the report to not render the report a second time.
Example:
procedure Tfrmqr.QuickRep1BeforePrint(Sender: TQuickRep; var PrintReport: boolean);
begin
QuickRep1.qrprinter.OnGenerateToPrinter := nil;
end;
第二种方法更本不行.
小丁又想出第三中方法,找了各种版本的动态联结库来替换老的版本,还是不行.
求各位打下指导小丁,谢谢.