Hello!!!!
I am trying to run the below code using NAS. But no PDF file is getting generated. Pls suggest.
The same code is working fine while running the same directly from Classic Client.
IF ISCLEAR(PDFCreator) THEN
CREATE(PDFCreator);
IF ISCLEAR(PDFCreatorError) THEN
CREATE(PDFCreatorError);
filedir := 'D:\';
filename := 'Finish Goods Stock';
PDFCreatorError := PDFCreator.cError;
IF PDFCreator.cStart('/NoProcessingAtStartup',TRUE) = FALSE THEN
ERROR('Status: Error: ' + PDFCreatorError.Description);
filename1 :=CONVERTSTR(FORMAT(filename),'.','_');
fn := CONVERTSTR(FORMAT(filename1),'/','_');
attachlocation := 'D:'+'\'+fn+'.pdf';
PDFCreatorOption := PDFCreator.cOptions;
PDFCreatorOption.AutosaveDirectory := filedir;
PDFCreatorOption.AutosaveFilename := fn;
PDFCreatorOption.UseAutosave := 1;
PDFCreatorOption.UseAutosaveDirectory := 1;
PDFCreatorOption.AutosaveFormat := 0;
PDFCreator.cOptions := PDFCreatorOption;
PDFCreator.cClearCache();
DefaultPrinter := PDFCreator.cDefaultPrinter;
PDFCreator.cDefaultPrinter := 'PDFCreator';
PDFCreator.cPrinterStop := FALSE;
REPORT.RUNMODAL(50084,FALSE,TRUE,Item);
Thanks,
0
Comments
Also make sure you are using the same creator version.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have checked all the settings. Everything seems perfect. But still no result with NAS..
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
(The command prompt window show the MESSAGE('Running report') I put in the code so i can see it executed the code to run the report)
PDFCreator never generated the .pdf file in my subdirectory on server. It's like the PDFCreator isn't intercepting the print job.