How to generate pdf report automatically in Dynamics NAV

假装没事ソ 提交于 2020-01-06 15:30:33

问题


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)

回答1:


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.



来源:https://stackoverflow.com/questions/37807565/how-to-generate-pdf-report-automatically-in-dynamics-nav

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!