Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Download archieved pdf files via web service

(0) ShareShare
ReportReport
Posted on by

Hey guys,

I need to download the archieved pdf file from an order via web services. Are there any information available regarding this issue? Is there some sample code? Do i need to use a seperate codeunit for downloading files or how can this be done?

Regards

*This post is locked for comments

  • Verified answer
    keoma Profile Picture
    32,727 on at
    RE: Download archieved pdf files via web service

    according the link i suggested, add two parameters to function GenerateReport.

    GenerateReport(ReportID : Integer, FilterString : Text[100])

    in this function you call then Report.SaveAsPdf(ReportID,filename,VarRecRef), where VarRecRef is a RecRef variable, where you load the base table of the report and set the needed filter. for usage follow kauffmann.nl/.../run-a-page-or-report-with-recordref-variable

  • Suggested answer
    Suresh Kulla Profile Picture
    47,688 on at
    RE: Download archieved pdf files via web service

    Check the below blog it has similar logic and where you can specify the ReportID and other filters if you need

    nav-magno.be/.../printing-pdf-reports-in-classic-without-external-components

  • Community Member Profile Picture
    on at
    RE: Download archieved pdf files via web service

    Yeah, just found out that i want to download the pdf of the report created via "print" button of an purchase order. I think i can use this link

    https://blogs.msdn.microsoft.com/nav-reporting/2009/01/26/how-to-get-a-dynamics-nav-report-with-a-web-service/

    The only question i got left is how do i tell which report to run and which filter to use for the report?

  • Suggested answer
    Suresh Kulla Profile Picture
    47,688 on at
    RE: Download archieved pdf files via web service

    Are you referring to the reports which you want to save as pdf and get it using web service or do you have some attachments to the order using links which you want to download?

  • Suggested answer
    Alexander Ermakov Profile Picture
    28,094 on at
    RE: Download archieved pdf files via web service

    Do I understand correctly that you want to address a web service and provide an order number to NAV, whereas NAV will generate a PDF invoice, pack it with zip and return to you back? This might also be helpful:

    forum.mibuso.com/.../print-report-from-webservice-no-pdf

  • Community Member Profile Picture
    on at
    RE: Download archieved pdf files via web service

    Thank you, this is a good starting info. I hoped for a bit more detailed information about how to get the pdf file associated with an order. Pretty new to ms nav development :(

  • Suggested answer
    keoma Profile Picture
    32,727 on at

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans