web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Append print a PDF to AX reports

(0) ShareShare
ReportReport
Posted on by 1,312

We have some cases where we want to print a PDF after another AX report, for example a drawing along with a production pick list. The drawing will have different print parameters (page size, orientation, paper tray) than the pick list, so I've added a container field "PrintDrawingSettings" to table ProdParmStartUp to store the packed printJobSettings (just like existing field ProdParmStartUp.SetupPickList).

My problem is that I'm not figuring out how to unpack the printJobSettings. I started with Palle Agermark's post as a basis for my class http://www.agermark.com/2008/01/print-pdf-files-from-ax-to-specific.html. When I instantiate the printJobSettings, the printJobSettings are set as "server: makes call to client printer". I'm not seeing how to unpack the packed PrintJobSettings stored in my new field.

I'm able to see the new packed field settings get passed to the class and it looks like I'm unpacking them. I'm not seeing how to assign the unpacked settings to the new instance of PrintJobSettings.

Any help would be most appreciated, Thanks!

*This post is locked for comments

  • Bhuvana Profile Picture
    20 on at

    Did you get any breakthrough ?

  • Mark Prouty Profile Picture
    1,312 on at

    I got busy with other stuff and ended up hardcoding a printer name. I'd like to fix it sometime because I think there are other applications we'll want to generate print jobs for (like Word).

    Printing to PDF is limited - you can only pass filename, printer name, driver, & port. We ended up having to create a specifically defined printer for each user anyway with all other desired print settings (orientation, page tray, paper size, duplex, etc). Then we just use the same name for all users.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans