Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

"Rendering output for the report failed" when using SAVEASPDF with barcode font

Posted on by Microsoft Employee

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:

SalesShptHeader.GET('XXXXX132');
SalesShptHeader.SETRECFILTER;
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.

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans