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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

x++ Code to get the list of all available printers?

(0) ShareShare
ReportReport
Posted on by 184

Hello All,

I need to get the list of all available printers via X++ code? so that I can add it as a lookup for an ssrs report so that it lets users select printers they want

Please suggest me how to do it..

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi,

    Could you please explain your requirement? You can always show the report dialog and choose the print destination where you will get a list of printers available.

    pastedimage1645480975366v1.png

  • D365_Wibes Profile Picture
    184 on at

    Hi Gunjan,

    Thanks your reply.

    My requirement is that I ll prompting a dialog before the report is sent to printers. SO I need to add drop down in dialog where user should have all the printers

  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    Which version of AX is this question about?

  • D365_Wibes Profile Picture
    184 on at

    Hi Martin,

    Its about D365 current version

  • D365_Wibes Profile Picture
    184 on at

    I am just looking for a way to get the list of all available printers via x++

  • Suggested answer
    GanapathyS Profile Picture
    75 on at

    static void AvailablePrinters(Args _args)

    {

    Microsoft.Dynamics.AX.Framework.Reporting.Shared.PrinterHelper printerHelper;

    System.Collections.ArrayList names;

    System.Collections.IEnumerator enumerator;

    str name;

    // BP Deviation documented

    printerHelper = new Microsoft.Dynamics.AX.Framework.Reporting.Shared.PrinterHelper();

    names = printerHelper.get_PrinterNames();

    if (names != null)

    {

    enumerator = names.GetEnumerator();

    while (enumerator.MoveNext())

    {

    name = enumerator.get_Current();

    info(name);

    }

    }

    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 663

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 439 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 337 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans