如何在Dynamics NAV中自动生成pdf报告 [英] How to generate pdf report automatically in Dynamics NAV
本文介绍了如何在Dynamics NAV中自动生成pdf报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我设计了一个报告,我想将每个报告以pdf格式保存到一个specifi文件夹中.我该如何使用编码单位或报告来实现这一目标?
I have designed a report and i would like to save each report in pdf into a specifi folder. How do i achieve this using a codeunit or report?
Number:=50050;
CustBill.RESET;
IF CustBill.FIND('-') THEN
tofile := DELCHR(CustBill."Customer No." + FORMAT(CustBill.Date),'=','/\:.,') + '.pdf';
Filename := 'D:\Bills\'+'tofile';
REPORT.SAVEASPDF(Number, Filename,Runrpt)
推荐答案
如果不使用begin
和end
而使用此语句IF CustBill.FIND('-') THEN
,则仅与下一行代码相关.在您的情况下,此tofile := DELCHR(CustBill."Customer No." + FORMAT(CustBill.Date),'=','/\:.,') + '.pdf';
这可能会导致此行被更新.
This statement IF CustBill.FIND('-') THEN
if used without begin
and end
only related to the single next line of code. In your case this one tofile := DELCHR(CustBill."Customer No." + FORMAT(CustBill.Date),'=','/\:.,') + '.pdf';
This will probably cause this line to newer be executed.
这篇关于如何在Dynamics NAV中自动生成pdf报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文