Hi all,

I have a weird error when using SAVEASPDF for a report I created. When I run the report from the client and go in preview everything works fine. Also printing and saving as PDF via client works well. But when I use SAVEASPDF from code, i always get the following error: "Rendering output for the report failed. Error HRESULT E_FAIL has been returned from a call to a COM component." (I hope thats the correct error message, because I get it in german and used other posts as a source for the english version).

So, when I print the report, use preview or save it as PDF via Client everythings fine, but the following (test-)call fails:

REPORT.SAVEASPDF(50051, 'C:\temp\test.pdf', SalesShptHeader);

The report contains a barcode (font "Bar-Code 39"). When I remove the barcode, save the report and run the above code again it works. But the customer needs the barcode on the report.

Do you have any ideas on how to solve/workaround this? The used NAV versions is 2015 CU24.