Hello all,
I have an issue where I am trying to send an smtp email with an attachment nightly. It runs the code and doesn’t break, however it does not save the file either. Here is the code for the saveaspdf functionality:
sih_lr.SETRANGE(“No.”,‘INV0000001’);
sih_lr.FINDFIRST;
tofile := DELCHR(sih_lr.“No.” + FORMAT(WORKDATE),’=’,’/:.,’) + ‘.pdf’;
FileName := ‘C:\temp’+tofile;
test:=REPORT.SAVEASPDF(REPORT::“Custom Sales Invoice”,FileName,sih_lr);
I have made sure that my temp file has full access, anything else that I am missing?